hotfix: the user may be define an extra arguments for a removed hook
diff --git a/pre_commit_hooks/removed.py b/pre_commit_hooks/removed.py index 9710b2d..60df096 100644 --- a/pre_commit_hooks/removed.py +++ b/pre_commit_hooks/removed.py
@@ -5,7 +5,7 @@ def main(argv: Optional[Sequence[str]] = None) -> int: argv = argv if argv is not None else sys.argv[1:] - hookid, new_hookid, url = argv + hookid, new_hookid, url = argv[:3] raise SystemExit( f'`{hookid}` has been removed -- use `{new_hookid}` from {url}', )
diff --git a/tests/removed_test.py b/tests/removed_test.py index 83df164..d635eb1 100644 --- a/tests/removed_test.py +++ b/tests/removed_test.py
@@ -8,6 +8,7 @@ main(( 'autopep8-wrapper', 'autopep8', 'https://github.com/pre-commit/mirrors-autopep8', + '--foo', 'bar', )) msg, = excinfo.value.args assert msg == (