Mark fields as readonly in builtins.pyi and types.pyi (#7392)

Add FunctionType.__builtins__
This commit is contained in:
Alex Waygood
2022-02-28 12:23:34 +00:00
committed by GitHub
parent bf167d4df4
commit 1ebedcc2b4
3 changed files with 159 additions and 74 deletions

View File

@@ -211,6 +211,9 @@ tkinter.font.Font.__getitem__ # Argument name differs (doesn't matter for __dun
traceback.TracebackException.from_exception # explicitly expanding arguments going into TracebackException __init__
types.GetSetDescriptorType.__get__ # this function can accept no value for the type parameter.
types.MemberDescriptorType.__get__ # this function can accept no value for the type parameter.
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.
types.ModuleType.__getattr__ # this doesn't exist at runtime
types.SimpleNamespace.__init__ # class doesn't accept positional arguments but has default C signature
typing.IO.__iter__ # Added because IO streams are iterable. See https://github.com/python/typeshed/commit/97bc450acd60c1bcdafef3ce8fbe3b95a9c0cac3