Skip to content

Commit 59d69de

Browse files
committed
Add comment explaining why we disable a type check
Related: google/pytype#1354
1 parent 6bdf899 commit 59d69de

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

aiosmtpd/docs/_exts/autoprogramm.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@
4646
__all__ = ("AutoprogrammDirective", "import_object", "scan_programs", "setup")
4747

4848

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

0 commit comments

Comments
 (0)