Skip to content

Commit ee770a7

Browse files
committed
add autoflake
1 parent e82b3f6 commit ee770a7

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ repos:
1212
- id: detect-private-key
1313
- id: end-of-file-fixer
1414
- id: fix-byte-order-marker
15-
- id: fix-encoding-pragma
16-
args: [--remove]
1715
- id: trailing-whitespace
1816
args: [--markdown-linebreak-ext=md]
1917

@@ -28,6 +26,12 @@ repos:
2826
hooks:
2927
- id: black
3028

29+
- repo: https://github.com/PyCQA/autoflake
30+
rev: v2.2.0
31+
hooks:
32+
- id: autoflake
33+
args: ["--remove-all-unused-imports", "--remove-unused-variables"]
34+
3135
- repo: https://github.com/pycqa/isort
3236
rev: 6.0.1
3337
hooks:

pum/cli.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,12 @@ def cli() -> int:
478478
args.max_version,
479479
args.verbose,
480480
)
481+
elif args.command == "help":
482+
parser.print_help()
483+
else:
484+
print(f"Unknown command: {args.command}")
485+
print("Use -h or --help for help.")
486+
exit_code = 1
481487

482488
return exit_code
483489

0 commit comments

Comments
 (0)