Add a structseq class to _typeshed (#6560)

Co-authored-by: Akuli <akuviljanen17@gmail.com>
This commit is contained in:
Alex Waygood
2021-12-17 21:42:09 +00:00
committed by GitHub
parent 183a43a7e0
commit 0b75d71303
16 changed files with 301 additions and 254 deletions

View File

@@ -5,9 +5,6 @@ curses.COLOR_PAIRS # Initialized after start_color
curses.COLS # Initialized only after initscr call.
curses.LINES # Initialized only after initscr call.
distutils.command.bdist_msi # msi is only available on windows
grp.struct_group._asdict # PyStructSequence
grp.struct_group._make # PyStructSequence
grp.struct_group._replace # PyStructSequence
os.EX_NOTFOUND
os.SF_MNOWAIT
os.SF_NODISKIO
@@ -35,9 +32,6 @@ winsound
ossaudiodev
spwd
# NamedTuple like, but not actually NamedTuples (PyStructSequence)
posix.[a-z]+_(param|result)._(asdict|make|replace)
# Platform differences that cannot be captured by the type system
fcntl.[A-Z0-9_]+
os.SCHED_[A-Z_]+
@@ -51,15 +45,9 @@ posix.SCHED_[A-Z_]+
distutils.msvccompiler.MSVCCompiler.get_msvc_paths
distutils.msvccompiler.MSVCCompiler.set_path_env_var
distutils.msvccompiler.MacroExpander
grp.struct_group.n_fields
grp.struct_group.n_sequence_fields
grp.struct_group.n_unnamed_fields
mimetypes.MimeTypes.read_windows_registry
os.ST_NOSUID
os.ST_RDONLY
resource.struct_rusage.n_fields
resource.struct_rusage.n_sequence_fields
resource.struct_rusage.n_unnamed_fields
selectors.DefaultSelector.fileno
socket.AddressInfo.AI_DEFAULT
socket.AddressInfo.AI_MASK

View File

@@ -5,9 +5,6 @@ curses.COLOR_PAIRS # Initialized after start_color
curses.COLS # Initialized only after initscr call.
curses.LINES # Initialized only after initscr call.
distutils.command.bdist_msi # msi is only available on windows
grp.struct_group._asdict # PyStructSequence
grp.struct_group._make # PyStructSequence
grp.struct_group._replace # PyStructSequence
os.EX_NOTFOUND
os.SF_MNOWAIT
os.SF_NODISKIO
@@ -18,9 +15,6 @@ select.EPOLL_RDHUP
selectors.KqueueSelector
signal.SIGEMT
signal.SIGINFO
spwd.struct_spwd._asdict # PyStructSequence
spwd.struct_spwd._make # PyStructSequence
spwd.struct_spwd._replace # PyStructSequence
# ==========
# Allowlist entries that cannot or should not be fixed
@@ -40,9 +34,6 @@ winsound
posix.error.characters_written
resource.error.characters_written
# NamedTuple like, but not actually NamedTuples (PyStructSequence)
posix.[a-z]+_(param|result)._(asdict|make|replace)
# Platform differences that cannot be captured by the type system
fcntl.[A-Z0-9_]+
os.SCHED_[A-Z_]+
@@ -56,31 +47,13 @@ posix.SCHED_[A-Z_]+
distutils.msvccompiler.MSVCCompiler.get_msvc_paths
distutils.msvccompiler.MSVCCompiler.set_path_env_var
distutils.msvccompiler.MacroExpander
grp.struct_group.n_fields
grp.struct_group.n_sequence_fields
grp.struct_group.n_unnamed_fields
mimetypes.MimeTypes.read_windows_registry
(os|posix).sched_param.n_fields
(os|posix).sched_param.n_sequence_fields
(os|posix).sched_param.n_unnamed_fields
(os|posix).waitid_result.n_fields
(os|posix).waitid_result.n_sequence_fields
(os|posix).waitid_result.n_unnamed_fields
resource.struct_rusage.n_fields
resource.struct_rusage.n_sequence_fields
resource.struct_rusage.n_unnamed_fields
selectors.DefaultSelector.fileno
signal.struct_siginfo.n_fields
signal.struct_siginfo.n_sequence_fields
signal.struct_siginfo.n_unnamed_fields
socket.MsgFlag.MSG_CMSG_CLOEXEC
socket.MsgFlag.MSG_CONFIRM
socket.MsgFlag.MSG_ERRQUEUE
socket.MsgFlag.MSG_FASTOPEN
socket.MsgFlag.MSG_MORE
socket.MsgFlag.MSG_NOSIGNAL
spwd.struct_spwd.n_fields
spwd.struct_spwd.n_sequence_fields
spwd.struct_spwd.n_unnamed_fields
spwd.struct_spwd.sp_nam
spwd.struct_spwd.sp_pwd

View File

@@ -146,9 +146,6 @@ _collections_abc.MappingView.__class_getitem__
_csv.Reader
_csv.Writer
_imp.source_hash
_thread._ExceptHookArgs.n_fields
_thread._ExceptHookArgs.n_sequence_fields
_thread._ExceptHookArgs.n_unnamed_fields
ast.Tuple.dims
ast.main
asyncio.AbstractEventLoop.connect_accepted_socket

View File

@@ -100,9 +100,6 @@ collections.Sequence.index # Supporting None in end is not mandatory
# Exists at runtime, but missing from stubs
_dummy_thread.RLock
_imp.source_hash
_thread._ExceptHookArgs.n_fields
_thread._ExceptHookArgs.n_sequence_fields
_thread._ExceptHookArgs.n_unnamed_fields
asyncio.BufferedProtocol.eof_received
asyncio.protocols.BufferedProtocol.eof_received
contextvars.ContextVar.__class_getitem__

View File

@@ -121,9 +121,6 @@ _collections_abc.Container.__class_getitem__
_collections_abc.Iterable.__class_getitem__
_collections_abc.MappingView.__class_getitem__
_imp.source_hash
_thread._ExceptHookArgs.n_fields
_thread._ExceptHookArgs.n_sequence_fields
_thread._ExceptHookArgs.n_unnamed_fields
ast.Tuple.dims
ast.main
asyncio.BufferedProtocol.eof_received

View File

@@ -269,7 +269,6 @@ inspect.Parameter.__init__
inspect.Signature.__init__
# Any field can be set on Namespace
multiprocessing.(dummy|managers).Namespace.__[gs]etattr__
os.[a-z]+_(param|result)._(asdict|make|replace) # NamedTuple like, but not actually NamedTuples
# sys attributes that are not always defined
sys.last_traceback
sys.last_type
@@ -627,18 +626,6 @@ multiprocessing.pool.Pool.Process
multiprocessing.pool.ThreadPool.Process
multiprocessing.reducer
multiprocessing.synchronize.Semaphore.get_value
(os|posix).stat_result.n_fields
(os|posix).stat_result.n_sequence_fields
(os|posix).stat_result.n_unnamed_fields
(os|posix).terminal_size.n_fields
(os|posix).terminal_size.n_sequence_fields
(os|posix).terminal_size.n_unnamed_fields
(os|posix).times_result.n_fields
(os|posix).times_result.n_sequence_fields
(os|posix).times_result.n_unnamed_fields
(os|posix).uname_result.n_fields
(os|posix).uname_result.n_sequence_fields
(os|posix).uname_result.n_unnamed_fields
pipes.Template.makepipeline
pipes.Template.open_r
pipes.Template.open_w

View File

@@ -52,7 +52,6 @@ distutils.msvccompiler.OldMSVCCompiler
msvcrt.SetErrorMode
os.get_handle_inheritable
os.set_handle_inheritable
os.statvfs_result
socket.MsgFlag.MSG_BCAST
socket.MsgFlag.MSG_MCAST
ssl.SSLSocket.recvmsg