Make ExitStack, AbstractContextManager and AsyncAbstractContextManager generic in return type of __exit__ (#11048)

This commit is contained in:
David Salvisberg
2024-04-22 16:43:08 +02:00
committed by GitHub
parent b3bfdadb45
commit f274c78fe5
5 changed files with 42 additions and 28 deletions

View File

@@ -533,6 +533,10 @@ typing(_extensions)?\.TextIO\.errors
typing(_extensions)?\.TextIO\.line_buffering
typing(_extensions)?\.TextIO\.newlines
# These are typing._SpecialGenericAlias at runtime, which is not a real type, but it
# behaves like one in most cases
typing(_extensions)?\.(Async)?ContextManager
types.MethodType.__closure__ # read-only but not actually a property; stubtest thinks it doesn't exist.
types.MethodType.__defaults__ # read-only but not actually a property; stubtest thinks it doesn't exist.
types.ModuleType.__dict__ # read-only but not actually a property; stubtest thinks it's a mutable attribute.