Bump mypy to 1.0 (#9684)

This commit is contained in:
Alex Waygood
2023-02-06 23:57:17 +00:00
committed by GitHub
parent f7cb7f33b2
commit efee70abfa
37 changed files with 45 additions and 167 deletions

View File

@@ -1,5 +1,4 @@
_?curses.color_pair
webbrowser.MacOSXOSAScript.__init__
# Github Actions on macOS with Python 3.10.5 claims these are missing, but they do exist locally
(locale.bind_textdomain_codeset)?

View File

@@ -1,6 +1,5 @@
ctypes.wintypes
pwd.getpwnam
webbrowser.MacOSXOSAScript.__init__
# ==========
# Allowlist entries that cannot or should not be fixed

View File

@@ -1,5 +1,3 @@
webbrowser.MacOSXOSAScript.__init__
# ==========
# Allowlist entries that cannot or should not be fixed
# ==========

View File

@@ -1,5 +1,3 @@
webbrowser.MacOSXOSAScript.__init__
# ==========
# Allowlist entries that cannot or should not be fixed
# ==========

View File

@@ -84,7 +84,6 @@ _collections_abc.Iterable.__class_getitem__
_collections_abc.MappingView.__class_getitem__
_csv.Reader
_csv.Writer
asynchat.__warningregistry__ # Removal planned for 3.12, can add if someone needs this
bdb.Breakpoint.clearBreakpoints
distutils.util.get_host_platform
inspect.Signature.from_builtin # Removed in 3.11, can add if someone needs this

View File

@@ -13,10 +13,9 @@ _collections_abc.ValuesView.__reversed__
_csv.Reader
_csv.Writer
argparse._MutuallyExclusiveGroup.add_mutually_exclusive_group
asynchat.__warningregistry__ # Removal planned for 3.12, can add if someone needs this
configparser.LegacyInterpolation.__init__
enum.Enum.__init__
# TODO: The stub for enum is nothing like the implementation
# TODO: The stub for enum.auto is nothing like the implementation
enum.auto.__init__
enum.auto.value
fractions.Fraction.__new__ # overload is too complicated for stubtest to resolve

View File

@@ -67,6 +67,10 @@ tempfile.SpooledTemporaryFile.readable
tempfile.SpooledTemporaryFile.seekable
tempfile.SpooledTemporaryFile.writable
# Default values given in the stub are a white lie, see #9637
tkinter.Tcl
tkinter.Tk.__init__
# Exists at runtime, but missing from stubs
contextvars.ContextVar.__class_getitem__
datetime.datetime_CAPI
@@ -76,7 +80,6 @@ distutils.cygwinccompiler.RE_VERSION
distutils.dist.command_re
distutils.fancy_getopt.longopt_re
distutils.fancy_getopt.neg_alias_re
distutils.core.DEBUG
distutils.core.USAGE
distutils.core.extension_keywords
distutils.core.gen_usage
@@ -91,7 +94,6 @@ ssl.OP_ENABLE_MIDDLEBOX_COMPAT
ssl.Options.OP_ENABLE_MIDDLEBOX_COMPAT
ssl.SSLObject.verify_client_post_handshake
ssl.SSLSocket.verify_client_post_handshake
stringprep.unicodedata # re-exported from unicodedata
tempfile.SpooledTemporaryFile.softspace
tkinter.Tk.split
tkinter.commondialog.[A-Z_]+
@@ -156,7 +158,6 @@ types.FunctionType.__get__
types.LambdaType.__get__
# Missing from distutils (deprecated, to be removed in 3.12)
distutils.core.DEBUG
distutils.core.USAGE
distutils.core.extension_keywords
distutils.core.gen_usage
@@ -184,7 +185,6 @@ distutils.core.Distribution.parse_command_line
distutils.core.Distribution.print_command_list
distutils.core.Distribution.reinitialize_command
distutils.core.Distribution.run_commands
distutils.cygwinccompiler.PIPE
distutils.cygwinccompiler.is_cygwingcc
distutils.dist.Distribution.announce
distutils.dist.Distribution.common_usage

View File

@@ -34,7 +34,6 @@ collections.KeysView.__reversed__
collections.ValuesView.__reversed__
collections.Mapping.__reversed__ # Set to None at runtime for a better error message
distutils.command.bdist_wininst # see #6523
distutils.core.DEBUG
distutils.core.USAGE
distutils.core.extension_keywords
distutils.core.gen_usage
@@ -89,6 +88,10 @@ tempfile.SpooledTemporaryFile.readable
tempfile.SpooledTemporaryFile.seekable
tempfile.SpooledTemporaryFile.writable
# Default values given in the stub are a white lie, see #9637
tkinter.Tcl
tkinter.Tk.__init__
# Exists at runtime, but missing from stubs
contextvars.ContextVar.__class_getitem__
datetime.datetime_CAPI
@@ -111,7 +114,6 @@ multiprocessing.managers.SharedMemoryServer.shutdown
multiprocessing.managers.SharedMemoryServer.track_segment
plistlib.Data.asBase64
plistlib.Data.fromBase64
stringprep.unicodedata # re-exported from unicodedata
tempfile.SpooledTemporaryFile.softspace
tkinter.Tk.split
tkinter.commondialog.[A-Z_]+
@@ -173,7 +175,6 @@ types.FunctionType.__get__
types.LambdaType.__get__
# Missing from distutils (deprecated, to be removed in 3.12)
distutils.core.DEBUG
distutils.core.USAGE
distutils.core.extension_keywords
distutils.core.gen_usage
@@ -201,7 +202,6 @@ distutils.core.Distribution.parse_command_line
distutils.core.Distribution.print_command_list
distutils.core.Distribution.reinitialize_command
distutils.core.Distribution.run_commands
distutils.cygwinccompiler.PIPE
distutils.cygwinccompiler.is_cygwingcc
distutils.dist.Distribution.announce
distutils.dist.Distribution.common_usage

View File

@@ -34,7 +34,6 @@ collections.ValuesView.__reversed__
contextlib.AbstractAsyncContextManager.__class_getitem__
contextlib.AbstractContextManager.__class_getitem__
distutils.command.bdist_wininst # see #6523
distutils.core.DEBUG
distutils.core.USAGE
distutils.core.extension_keywords
distutils.core.gen_usage
@@ -112,7 +111,6 @@ multiprocessing.managers.SharedMemoryServer.public
multiprocessing.managers.SharedMemoryServer.release_segment
multiprocessing.managers.SharedMemoryServer.shutdown
multiprocessing.managers.SharedMemoryServer.track_segment
stringprep.unicodedata # re-exported from unicodedata
types.GenericAlias.__mro_entries__
typing._SpecialForm.__mro_entries__
@@ -172,7 +170,6 @@ types.FunctionType.__get__
types.LambdaType.__get__
# Missing from distutils (deprecated, to be removed in 3.12)
distutils.core.DEBUG
distutils.core.USAGE
distutils.core.extension_keywords
distutils.core.gen_usage
@@ -200,7 +197,6 @@ distutils.core.Distribution.parse_command_line
distutils.core.Distribution.print_command_list
distutils.core.Distribution.reinitialize_command
distutils.core.Distribution.run_commands
distutils.cygwinccompiler.PIPE
distutils.cygwinccompiler.is_cygwingcc
distutils.dist.Distribution.announce
distutils.dist.Distribution.common_usage

View File

@@ -30,6 +30,7 @@ _weakref.CallableProxyType.__getattr__ # Should have all attributes of proxy
_weakref.ProxyType.__getattr__ # Should have all attributes of proxy
_weakref.ReferenceType.__call__ # C function default annotation is wrong
_weakref.ReferenceType.__init__ # Runtime defines __new__ but stubtest thinks __init__ is also defined.
argparse.ArgumentParser.__init__ # stubtest doesn't recognise the runtime default (a class) as being compatible with a callback protocol (the stub annotation)
argparse.Namespace.__getattr__ # The whole point of this class is its attributes are dynamic
asynchat.async_chat.encoding # Removal planned for 3.12, can add if someone needs this
asynchat.async_chat.use_encoding # Removal planned for 3.12, can add if someone needs this
@@ -132,7 +133,7 @@ lib2to3.pytree.NegatedPattern.match
lib2to3.pytree.NegatedPattern.match_seq
# LC_MESSAGES is sometimes present in __all__, sometimes not,
# so stubtest will sometimes complain about exported names being different at runtime to the exported names in the stub
(locale)?
(locale.__all__)?
multiprocessing.JoinableQueue
multiprocessing.Queue
multiprocessing.SimpleQueue
@@ -493,17 +494,7 @@ turtle.ScrolledCanvas.find_all
turtle.ScrolledCanvas.select_clear
turtle.ScrolledCanvas.select_item
# Unnecessary re-exports
asyncore\.E[A-Z]+ # re-exported from errno
asyncore.errorcode # re-exported from errno
email._header_value_parser.hexdigits
logging.handlers.ST_[A-Z]+
xml.dom.expatbuilder.EMPTY_NAMESPACE
xml.dom.expatbuilder.EMPTY_PREFIX
xml.dom.expatbuilder.XMLNS_NAMESPACE
xml.dom.minidom.EMPTY_NAMESPACE
xml.dom.minidom.EMPTY_PREFIX
xml.dom.minidom.XMLNS_NAMESPACE
# Unnecessary re-export
xml.dom.minidom.StringTypes
# __all__-related weirdness (see #6523)
@@ -655,11 +646,7 @@ distutils.ccompiler.compiler_class
distutils.cmd.Command.dump_options
distutils.cmd.Command.ensure_finalized
distutils.command.bdist
distutils.command.bdist_rpm.DEBUG
distutils.command.build_ext.USER_BASE
distutils.command.build_scripts.ST_MODE
distutils.command.install.*
distutils.command.install_scripts.ST_MODE
distutils.core.Distribution.finalize_options
distutils.core.Distribution.get_command_class
distutils.core.Distribution.get_command_list
@@ -681,7 +668,6 @@ distutils.cygwinccompiler.check_config_h
distutils.cygwinccompiler.get_msvcr
distutils.cygwinccompiler.get_versions
distutils.dir_util.ensure_relative
distutils.dist.DEBUG
distutils.dist.Distribution.finalize_options
distutils.dist.Distribution.get_command_class
distutils.dist.Distribution.get_command_list
@@ -722,7 +708,6 @@ distutils.msvccompiler.get_build_version
distutils.msvccompiler.normalize_and_reduce_paths
distutils.msvccompiler.read_keys
distutils.msvccompiler.read_values
distutils.spawn.DEBUG
distutils.sysconfig.BASE_EXEC_PREFIX
distutils.sysconfig.BASE_PREFIX
distutils.sysconfig.build_flags

View File

@@ -1,6 +1,4 @@
ctypes.GetLastError # Is actually a pointer
distutils.archive_util.getgrnam
distutils.archive_util.getpwnam
distutils.msvccompiler.HKEYS
locale.[A-Z0-9_]+ # Constants that should be moved to _locale and re-exported conditionally
locale.nl_langinfo # Function that should be moved to _locale and re-exported conditionally
@@ -14,7 +12,6 @@ selectors.KqueueSelector
signal.SIGEMT
signal.SIGINFO
winsound.SND_APPLICATION
xmlrpc.server.fcntl
# Exists at runtime, but missing from stubs
_msi.MSIError