From 8fc809d03920e8e1215ea4b1e2e079fd9f6ac546 Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Thu, 25 Mar 2021 18:56:31 -0600 Subject: start using mypy in strict mode --- yapymake/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'yapymake/__init__.py') diff --git a/yapymake/__init__.py b/yapymake/__init__.py index fe4b182..8a0c31d 100644 --- a/yapymake/__init__.py +++ b/yapymake/__init__.py @@ -4,7 +4,7 @@ DESCRIPTION = 'A (mostly) POSIX-compatible make implemented in Python' from .args import parse from .makefile import Makefile -def main(): +def main() -> None: these_args = parse() file = Makefile(these_args) # TODO dump command line into MAKEFLAGS @@ -15,6 +15,7 @@ def main(): targets = [arg for arg in these_args.targets_or_macros if '=' not in arg] if len(targets) == 0: + assert file.first_non_special_target is not None targets = [file.first_non_special_target] for target in targets: -- cgit v1.2.3