ArgumentParser.parse_args
with Namespace
subclass does not work anymore
#10400
Labels
stubs: false positive
Type checkers report false errors
Ref: microsoft/pylance-release#4569 (comment)
This is introduced in #10307. (cc @qthequartermasterman as the author)
typeshed/stdlib/argparse.pyi
Lines 173 to 178 in 31dca1d
The first overload now shadows the following. E.g.,
ArgumentParser().parse_args(namespace=MyNamespace())
should match the third but actually matches the first, which unexpectedly returnsNamespace
instead ofMyNamespace
.The text was updated successfully, but these errors were encountered: