From 6bfcd52cfe5c78c1aefa4c83a5ef8ec42ada6bf2 Mon Sep 17 00:00:00 2001 From: Elena ``of Valhalla'' Grandi Date: Tue, 22 Feb 2022 20:00:22 +0100 Subject: Add type hints --- hazwaz/command.py | 4 ++-- run_typecheck | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100755 run_typecheck 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 -- cgit v1.2.3