Skip to content

Commit

Permalink
Add comment explaining why we disable a type check
Browse files Browse the repository at this point in the history
  • Loading branch information
pepoluan committed Jan 13, 2023
1 parent 6bdf899 commit 59d69de
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions aiosmtpd/docs/_exts/autoprogramm.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@
__all__ = ("AutoprogrammDirective", "import_object", "scan_programs", "setup")


# Need to temporarily disable this particular check, because although this function is guaranteed to return a proper
# value (due to how ArgumentParser works), pytype doesn't really know that, and therefore raised an error
# in the (to its view) possible fallthrough of "implicit return None" if the "for a" loop exits without finding the
# right item.
#
# pytype: disable=bad-return-type
def get_subparser_action(parser: argparse.ArgumentParser) -> argparse._SubParsersAction:
neg1_action = parser._actions[-1]
Expand Down

0 comments on commit 59d69de

Please sign in to comment.