Various stdlib dunders: correct parameter names; improve types; add defaults (#9761)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
Alex Waygood
2023-02-19 23:44:20 +01:00
committed by GitHub
parent 74112dc189
commit c5b5dd4bf4
8 changed files with 31 additions and 23 deletions

View File

@@ -157,6 +157,11 @@ builtins.property.__get__
builtins.staticmethod.__get__
types.FunctionType.__get__
types.LambdaType.__get__
types.ClassMethodDescriptorType.__get__
types.GetSetDescriptorType.__get__
types.MemberDescriptorType.__get__
types.MethodDescriptorType.__get__
types.WrapperDescriptorType.__get__
# Missing from distutils (deprecated, to be removed in 3.12)
distutils.core.USAGE

View File

@@ -174,6 +174,11 @@ builtins.property.__get__
builtins.staticmethod.__get__
types.FunctionType.__get__
types.LambdaType.__get__
types.ClassMethodDescriptorType.__get__
types.GetSetDescriptorType.__get__
types.MemberDescriptorType.__get__
types.MethodDescriptorType.__get__
types.WrapperDescriptorType.__get__
# Missing from distutils (deprecated, to be removed in 3.12)
distutils.core.USAGE

View File

@@ -169,6 +169,11 @@ builtins.property.__get__
builtins.staticmethod.__get__
types.FunctionType.__get__
types.LambdaType.__get__
types.ClassMethodDescriptorType.__get__
types.GetSetDescriptorType.__get__
types.MemberDescriptorType.__get__
types.MethodDescriptorType.__get__
types.WrapperDescriptorType.__get__
# Missing from distutils (deprecated, to be removed in 3.12)
distutils.core.USAGE

View File

@@ -428,13 +428,6 @@ pickle.Unpickler.memo # undocumented implementation detail, has different type
re.Pattern.scanner # Undocumented and not useful. #6405
tempfile._TemporaryFileWrapper.[\w_]+ # Dynamically specified by __getattr__, and thus don't exist on the class
# Runtime signature is incorrect (https://github.com/python/cpython/issues/93021)
types.ClassMethodDescriptorType.__get__
types.GetSetDescriptorType.__get__
types.MemberDescriptorType.__get__
types.MethodDescriptorType.__get__
types.WrapperDescriptorType.__get__
# Various classes in typing aren't types at runtime. In addition, mypy thinks some special forms are tautologically defined.
typing.[A-Z]\w+
typing_extensions\..*