stdlib/3/inspect: fix _ParameterKind being an empty enum (#4383)

This makes mypy think that conditions like

    parameter.kind is Parameter.POSITIONAL_OR_KEYWORD

are always false, which triggers `unreachable` warnings, among other
problems.
This commit is contained in:
Ran Benita
2020-08-04 12:02:36 +03:00
committed by GitHub
parent 8ae5549b61
commit cd132ff161
2 changed files with 33 additions and 6 deletions

View File

@@ -210,6 +210,11 @@ importlib.machinery.WindowsRegistryFinder.find_spec
importlib.util.spec_from_file_location
importlib.util.spec_from_loader
inspect.BoundArguments.__init__
inspect.Parameter.KEYWORD_ONLY
inspect.Parameter.POSITIONAL_ONLY
inspect.Parameter.POSITIONAL_OR_KEYWORD
inspect.Parameter.VAR_KEYWORD
inspect.Parameter.VAR_POSITIONAL
inspect.Parameter.replace
inspect.Signature.replace
inspect.getabsfile