summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2022-02-22 20:00:22 +0100
committerElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2022-02-22 20:00:22 +0100
commit6bfcd52cfe5c78c1aefa4c83a5ef8ec42ada6bf2 (patch)
tree2bcdffbecac15ceb67c7198839e82ff22e2d7fd6
parent087e5431491881436f98d9cf67393fe8baa1b73c (diff)
Add type hints
-rw-r--r--hazwaz/command.py4
-rwxr-xr-xrun_typecheck3
2 files changed, 5 insertions, 2 deletions
diff --git a/hazwaz/command.py b/hazwaz/command.py
index 6618946..eb19eaf 100644
--- a/hazwaz/command.py
+++ b/hazwaz/command.py
@@ -59,7 +59,7 @@ class MainCommand:
def _main(self, args):
self.parser.print_help()
- def add_arguments(self, parser):
+ def add_arguments(self, parser: argparse.ArgumentParser):
group = parser.add_mutually_exclusive_group()
group.add_argument(
'--verbose', '-v',
@@ -102,5 +102,5 @@ class Command:
self.args = args
self.main()
- def add_arguments(self, parser):
+ def add_arguments(self, parser: argparse.ArgumentParser):
pass
diff --git a/run_typecheck b/run_typecheck
new file mode 100755
index 0000000..1dd6bc9
--- /dev/null
+++ b/run_typecheck
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+mypy hazwaz