Skip to content

Commit

Permalink
Fix md2po2md always exiting with code 5 passing --no-empty-msgstr (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mondeja authored Nov 16, 2024
1 parent 5f49d54 commit 7c3bc78
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions docs/pre-commit-hooks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ so you don't need to specify them.
.. code-block:: yaml
- repo: https://github.com/mondeja/mdpo
rev: v2.1.2
rev: v2.1.3
hooks:
- id: md2po
args:
Expand All @@ -32,7 +32,7 @@ so you don't need to specify them.
.. code-block:: yaml
- repo: https://github.com/mondeja/mdpo
rev: v2.1.2
rev: v2.1.3
hooks:
- id: md2po
files: ^README\.md
Expand All @@ -53,7 +53,7 @@ po2md
.. code-block:: yaml
- repo: https://github.com/mondeja/mdpo
rev: v2.1.2
rev: v2.1.3
hooks:
- id: po2md
args:
Expand All @@ -68,7 +68,7 @@ po2md
.. code-block:: yaml
- repo: https://github.com/mondeja/mdpo
rev: v2.1.2
rev: v2.1.3
hooks:
- id: po2md
files: ^README\.md
Expand All @@ -91,7 +91,7 @@ md2po2md
.. code-block:: yaml
- repo: https://github.com/mondeja/mdpo
rev: v2.1.2
rev: v2.1.3
hooks:
- id: md2po2md
args:
Expand All @@ -107,7 +107,7 @@ md2po2md
.. code-block:: yaml
- repo: https://github.com/mondeja/mdpo
rev: v2.1.2
rev: v2.1.3
hooks:
- id: md2po2md
files: ^README\.md
Expand All @@ -126,7 +126,7 @@ mdpo2html
.. code-block:: yaml
- repo: https://github.com/mondeja/mdpo
rev: v2.1.2
rev: v2.1.3
hooks:
- id: mdpo2html
args:
Expand All @@ -141,7 +141,7 @@ mdpo2html
.. code-block:: yaml
- repo: https://github.com/mondeja/mdpo
rev: v2.1.2
rev: v2.1.3
hooks:
- id: mdpo2html
files: ^README\.html
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "mdpo"
version = "2.1.2"
version = "2.1.3"
description = "Markdown files translation using PO files."
readme = "README.md"
license = "BSD-3-Clause"
Expand Down
2 changes: 1 addition & 1 deletion src/mdpo/md2po2md/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def run(args=frozenset()):

exitcode = 4

if opts.no_empty_msgstr:
if empties:
if len(empties) > 2: # noqa PLR2004
sys.stderr.write(
f'Found {len(empties)} empty msgstrs:\n',
Expand Down

0 comments on commit 7c3bc78

Please sign in to comment.