Skip to content

Commit

Permalink
checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
moshez committed Jan 5, 2024
1 parent 9d2fa2f commit daa2cd6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "gather"
version = "2024.1.5.1"
version = "2024.1.5.2"
description = "A gatherer"
readme = "README.rst"
authors = [{name = "Moshe Zadka", email = "[email protected]"}]
Expand Down
11 changes: 10 additions & 1 deletion src/gather/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,15 @@ def wrapped_dry_run(cmdargs, **kwargs):
args.orig_run = orig_run


def run_maybe_dry(*, parser, argv=sys.argv, env=os.environ, sp_run=subprocess.run, is_subcommand=False, prefix=None):
def run_maybe_dry(
*,
parser,
argv=sys.argv,
env=os.environ,
sp_run=subprocess.run,
is_subcommand=False,
prefix=None,
):
"""
Run commands that only take ``args``.
Expand All @@ -128,6 +136,7 @@ def run_maybe_dry(*, parser, argv=sys.argv, env=os.environ, sp_run=subprocess.ru
* ``safe_run``: Run with logging
* ``orig_run``: Original function
"""

def error(args):
parser.print_help()
raise SystemExit(1)
Expand Down
1 change: 1 addition & 0 deletions src/gather/tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ def test_custom_parser(self):
contains_string("custom help message"),
)


class CommandMaybeDryTest(unittest.TestCase):

"""Test run_maybe_dry"""
Expand Down

0 comments on commit daa2cd6

Please sign in to comment.