Fix stubtest complaints for various .get() methods (#10690)

This commit is contained in:
Alex Waygood
2023-09-10 22:48:09 +01:00
committed by GitHub
parent 011b5b9c2c
commit 6dda2fe9c8
4 changed files with 17 additions and 4 deletions

View File

@@ -1,5 +1,4 @@
# Uncategorised, from Python 3.12
collections.UserDict.get
enum.Enum.__signature__
enum.EnumMeta.__call__
enum.EnumType.__call__

View File

@@ -26,7 +26,6 @@ asyncio.futures.Future.__init__ # Usually initialized from c object
builtins.dict.get
builtins.ellipsis # type is not exposed anywhere
builtins.function
collections.ChainMap.get # Adding None to the underlying Mapping Union messed up mypy
collections.ChainMap.fromkeys # Runtime has *args which can really only be one argument
collections.UserList.sort # Runtime has *args but will error if any are supplied
configparser.SectionProxy.__getattr__ # SectionProxy can have arbitrary attributes when custom converters are used
@@ -129,9 +128,7 @@ typing(_extensions)?\.IO\.__next__ # Added because IO streams are iterable. See
typing.type_check_only # typing decorator that is not available at runtime
unittest.mock.patch # It's a complicated overload and I haven't been able to figure out why stubtest doesn't like it
urllib.request.HTTPPasswordMgrWithPriorAuth.__init__ # Args are passed as is to super, so super args are specified
weakref.WeakKeyDictionary.get
weakref.WeakKeyDictionary.update
weakref.WeakValueDictionary.get
weakref.WeakValueDictionary.update
xml.etree.ElementTree.XMLParser.__init__ # Defined in C so has general signature
xml.etree.cElementTree.XMLParser.__init__ # Defined in C so has general signature