Removed tests from typeshed stubs. We don't use these, so they're just taking up unnecessary space.

This commit is contained in:
Eric Traut 2024-01-21 17:05:31 -08:00
parent a168f42a3e
commit 015e143247
116 changed files with 0 additions and 2064 deletions

View File

@ -1,2 +0,0 @@
# Stub-only module.
exifread._types

View File

@ -1,11 +0,0 @@
markdown.extensions.abbr.ABBR_REF_RE
markdown.extensions.attr_list.AttrListTreeprocessor.run
markdown.extensions.codehilite.CodeHilite.__init__
markdown.extensions.fenced_code.FencedBlockPreprocessor.__init__
markdown.extensions.footnotes.DEF_RE
markdown.extensions.footnotes.FootnotePreprocessor
markdown.extensions.footnotes.TABBED_RE
markdown.extensions.legacy_attrs.LegacyAttrs.run
markdown.extensions.toc.TocTreeprocessor.run
markdown.extensions.toc.slugify
markdown.postprocessors.UnescapePostprocessor # deprecated

View File

@ -1,26 +0,0 @@
PIL.__main__
# Requires Pyside or PyQt to be installed.
# Not worth adding to tool.stubtest.stubtest_requirements
# because it's only used as a base type and it's a long install.
PIL.ImageQt.ImageQt
# Only stubbing what's necessary from private modules
PIL\._imaging\.\w+?
# Internal logger variable
PIL\..+?\.logger
# Loop variables leaked in global scope
PIL.BmpImagePlugin.BmpImageFile.k
PIL.BmpImagePlugin.BmpImageFile.v
PIL.Image.enum
PIL.Image.item
PIL.ImageCms.flag
PIL.ImageMath.k
PIL.ImageMath.v
PIL.ImageQt.qt_module
PIL.ImImagePlugin.i
PIL.XVThumbImagePlugin.b
PIL.XVThumbImagePlugin.g
PIL.XVThumbImagePlugin.r

View File

@ -1,2 +0,0 @@
# Loop variables leaked in global scope
PIL.EpsImagePlugin.binary

View File

@ -1,15 +0,0 @@
# Verify that ImageTK images are valid to pass to TK code.
from __future__ import annotations
import tkinter
from PIL import ImageTk
photo = ImageTk.PhotoImage()
bitmap = ImageTk.BitmapImage()
tkinter.Label(image=photo)
tkinter.Label(image=bitmap)
tkinter.Label().configure(image=photo)
tkinter.Label().configure(image=bitmap)

View File

@ -1,12 +0,0 @@
pymysql.connections.byte2int
pymysql.connections.int2byte
pymysql.connections.lenenc_int
pymysql.connections.pack_int24
pymysql.cursors.Cursor.__del__
# DictCursorMixin changes method types of inherited classes, but doesn't contain much at runtime
pymysql.cursors.DictCursorMixin.__iter__
pymysql.cursors.DictCursorMixin.fetch[a-z]*
pymysql.escape_dict
pymysql.escape_sequence
pymysql.escape_string
pymysql.util

View File

@ -1,4 +0,0 @@
# temp variable used to define scrotExists by checking if the command "scrot" exists
pyscreeze.whichProc
# present but unimplemented
pyscreeze.screenshotWindow

View File

@ -1,8 +0,0 @@
# yaml._yaml is for backwards compatibility so none of it matters anyway
yaml._yaml.__test__
# Some arguments to these functions are technically positional or keyword
# arguments at runtime, but according to the documentation and other,
# similar functions, it's safer to treat them as keyword-only arguments.
yaml.dump_all
yaml.serialize_all

View File

@ -1,9 +0,0 @@
# Pygments uses mcs, pyright wants cls
pygments.lexer.LexerMeta.__new__
pygments.style.StyleMeta.__new__
# Defined in lexer classes, intended to be used as static method, but doesn't use @staticmethod
pygments.lexer.LexerMeta.analyse_text
# Inheriting from tuple is weird
pygments.token._TokenType.__init__

View File

@ -1,98 +0,0 @@
# These all delegate using *args,**kwargs, but stubs use signature of
# method they are being delegated to.
aiofiles.threadpool.binary.AsyncBufferedIOBase.close
aiofiles.threadpool.binary.AsyncBufferedIOBase.detach
aiofiles.threadpool.binary.AsyncBufferedIOBase.fileno
aiofiles.threadpool.binary.AsyncBufferedIOBase.flush
aiofiles.threadpool.binary.AsyncBufferedIOBase.isatty
aiofiles.threadpool.binary.AsyncBufferedIOBase.readable
aiofiles.threadpool.binary.AsyncBufferedIOBase.seekable
aiofiles.threadpool.binary.AsyncBufferedIOBase.tell
aiofiles.threadpool.binary.AsyncBufferedIOBase.writable
aiofiles.threadpool.binary.AsyncIndirectBufferedIOBase.close
aiofiles.threadpool.binary.AsyncIndirectBufferedIOBase.detach
aiofiles.threadpool.binary.AsyncIndirectBufferedIOBase.fileno
aiofiles.threadpool.binary.AsyncIndirectBufferedIOBase.flush
aiofiles.threadpool.binary.AsyncIndirectBufferedIOBase.isatty
aiofiles.threadpool.binary.AsyncIndirectBufferedIOBase.readable
aiofiles.threadpool.binary.AsyncIndirectBufferedIOBase.seekable
aiofiles.threadpool.binary.AsyncIndirectBufferedIOBase.tell
aiofiles.threadpool.binary.AsyncIndirectBufferedIOBase.writable
aiofiles.threadpool.binary.AsyncFileIO.close
aiofiles.threadpool.binary.AsyncFileIO.fileno
aiofiles.threadpool.binary.AsyncFileIO.flush
aiofiles.threadpool.binary.AsyncFileIO.isatty
aiofiles.threadpool.binary.AsyncFileIO.readable
aiofiles.threadpool.binary.AsyncFileIO.readall
aiofiles.threadpool.binary.AsyncFileIO.seekable
aiofiles.threadpool.binary.AsyncFileIO.tell
aiofiles.threadpool.binary.AsyncFileIO.writable
aiofiles.threadpool.binary.AsyncIndirectFileIO.close
aiofiles.threadpool.binary.AsyncIndirectFileIO.fileno
aiofiles.threadpool.binary.AsyncIndirectFileIO.flush
aiofiles.threadpool.binary.AsyncIndirectFileIO.isatty
aiofiles.threadpool.binary.AsyncIndirectFileIO.readable
aiofiles.threadpool.binary.AsyncIndirectFileIO.readall
aiofiles.threadpool.binary.AsyncIndirectFileIO.seekable
aiofiles.threadpool.binary.AsyncIndirectFileIO.tell
aiofiles.threadpool.binary.AsyncIndirectFileIO.writable
aiofiles.threadpool.text.AsyncTextIOWrapper.close
aiofiles.threadpool.text.AsyncTextIOWrapper.detach
aiofiles.threadpool.text.AsyncTextIOWrapper.fileno
aiofiles.threadpool.text.AsyncTextIOWrapper.flush
aiofiles.threadpool.text.AsyncTextIOWrapper.isatty
aiofiles.threadpool.text.AsyncTextIOWrapper.readable
aiofiles.threadpool.text.AsyncTextIOWrapper.seekable
aiofiles.threadpool.text.AsyncTextIOWrapper.tell
aiofiles.threadpool.text.AsyncTextIOWrapper.writable
aiofiles.threadpool.text.AsyncTextIndirectIOWrapper.close
aiofiles.threadpool.text.AsyncTextIndirectIOWrapper.detach
aiofiles.threadpool.text.AsyncTextIndirectIOWrapper.fileno
aiofiles.threadpool.text.AsyncTextIndirectIOWrapper.flush
aiofiles.threadpool.text.AsyncTextIndirectIOWrapper.isatty
aiofiles.threadpool.text.AsyncTextIndirectIOWrapper.readable
aiofiles.threadpool.text.AsyncTextIndirectIOWrapper.seekable
aiofiles.threadpool.text.AsyncTextIndirectIOWrapper.tell
aiofiles.threadpool.text.AsyncTextIndirectIOWrapper.writable
# These functions get the wrong signature from functools.wraps()
aiofiles.os.stat
aiofiles.os.rename
aiofiles.os.renames
aiofiles.os.replace
aiofiles.os.remove
aiofiles.os.unlink
aiofiles.os.mkdir
aiofiles.os.makedirs
aiofiles.os.link
aiofiles.os.symlink
aiofiles.os.readlink
aiofiles.os.rmdir
aiofiles.os.removedirs
aiofiles.os.scandir
aiofiles.os.listdir
aiofiles.ospath.exists
aiofiles.ospath.isfile
aiofiles.ospath.isdir
aiofiles.ospath.getsize
aiofiles.ospath.getmtime
aiofiles.ospath.getatime
aiofiles.ospath.getctime
aiofiles.ospath.samefile
aiofiles.ospath.sameopenfile
# Same issues as above
aiofiles.tempfile.temptypes.AsyncSpooledTemporaryFile.close
aiofiles.tempfile.temptypes.AsyncSpooledTemporaryFile.fileno
aiofiles.tempfile.temptypes.AsyncSpooledTemporaryFile.flush
aiofiles.tempfile.temptypes.AsyncSpooledTemporaryFile.isatty
aiofiles.tempfile.temptypes.AsyncSpooledTemporaryFile.rollover
aiofiles.tempfile.temptypes.AsyncSpooledTemporaryFile.tell
aiofiles.tempfile.temptypes.AsyncTemporaryDirectory.cleanup
# Metaclass differs:
aiofiles.base.AiofilesContextManager
aiofiles.tempfile.AiofilesContextManagerTempDir
# Helper decorator, too complex to type
aiofiles.os.wrap

View File

@ -1,2 +0,0 @@
# This function gets the wrong signature from functools.wraps()
aiofiles.os.sendfile

View File

@ -1,2 +0,0 @@
# This function gets the wrong signature from functools.wraps()
aiofiles.os.sendfile

View File

@ -1,4 +0,0 @@
aws_xray_sdk.core.async_recorder.subsegment_decorator
aws_xray_sdk.core.models.subsegment.subsegment_decorator
aws_xray_sdk.core.sampling.connector.ServiceConnector.fetch_sampling_rules
aws_xray_sdk.core.sampling.sampler.ServiceConnector.fetch_sampling_rules

View File

@ -1,2 +0,0 @@
bleach.css_sanitizer # Requires tinycss2 to be installed
bleach.html5lib_shim.*

View File

@ -1,10 +0,0 @@
# These names exist in __all__, but have no definition:
boltons.strutils.int_list_complement
boltons.strutils.int_list_to_int_tuples
# Internal compatibility aliases
boltons.cacheutils.basestring
boltons.funcutils.basestring
boltons.funcutils.inspect_formatargspec
boltons.funcutils.make_method
boltons.iterutils.basestring

View File

@ -1,9 +0,0 @@
boto.connection.AWSQueryConnection.make_request
boto.elb
boto.kms.layer1.KMSConnection.make_request
boto.s3.S3RegionInfo.connect
boto.s3.bucket.Bucket.get_location
boto.s3.bucket.Bucket.get_tags
boto.s3.bucket.Bucket.get_xml_tags
boto.s3.connection.S3Connection.make_request
boto.utils.LazyLoadMetadata.get

View File

@ -1 +0,0 @@
.*\.AttributeGetter.__repr__ # has an extra argument, but also a million things inherit from it

View File

@ -1,22 +0,0 @@
cachetools.Cache.get
# stubs omit defaulted arguments that are meant to be optimizations, not provided by user
cachetools.FIFOCache.__delitem__
cachetools.FIFOCache.__setitem__
cachetools.LFUCache.__delitem__
cachetools.LFUCache.__getitem__
cachetools.LFUCache.__setitem__
cachetools.LRUCache.__delitem__
cachetools.LRUCache.__getitem__
cachetools.LRUCache.__setitem__
cachetools.MRUCache.__delitem__
cachetools.MRUCache.__getitem__
cachetools.MRUCache.__setitem__
cachetools.TLRUCache.__delitem__
cachetools.TLRUCache.__getitem__
cachetools.TLRUCache.__setitem__
cachetools.TTLCache.__delitem__
cachetools.TTLCache.__getitem__
cachetools.TTLCache.__setitem__
cachetools._TimedCache.__len__
cachetools._TimedCache.__repr__

View File

@ -1,13 +0,0 @@
# **kwargs replaced with actual arguments in stubs
caldav.DAVClient.calendar
caldav.DAVClient.principal
caldav.davclient.DAVClient.calendar
caldav.davclient.DAVClient.principal
# Initialized in class, but immediately overwritten in __init__
caldav.DAVClient.url
caldav.davclient.DAVClient.url
caldav.davclient.DAVResponse.headers
caldav.elements.base.BaseElement.children
.*.findprop

View File

@ -1,4 +0,0 @@
# added dynamically and not detected by stubtest
cffi.(api.)?FFI.CData
cffi.(api.)?FFI.CType
cffi.(api.)?FFI.buffer

View File

@ -1,2 +0,0 @@
# Technically exists on all OSs, but crashes on all but Windows. So we hide it in stubs
cffi.(api.)?FFI.getwinerror

View File

@ -1,2 +0,0 @@
# Technically exists on all OSs, but crashes on all but Windows. So we hide it in stubs
cffi.(api.)?FFI.getwinerror

View File

@ -1,46 +0,0 @@
# These are defined as ints, but later are converted to strings via magic:
colorama.ansi.AnsiBack.BLACK
colorama.ansi.AnsiBack.BLUE
colorama.ansi.AnsiBack.CYAN
colorama.ansi.AnsiBack.GREEN
colorama.ansi.AnsiBack.LIGHTBLACK_EX
colorama.ansi.AnsiBack.LIGHTBLUE_EX
colorama.ansi.AnsiBack.LIGHTCYAN_EX
colorama.ansi.AnsiBack.LIGHTGREEN_EX
colorama.ansi.AnsiBack.LIGHTMAGENTA_EX
colorama.ansi.AnsiBack.LIGHTRED_EX
colorama.ansi.AnsiBack.LIGHTWHITE_EX
colorama.ansi.AnsiBack.LIGHTYELLOW_EX
colorama.ansi.AnsiBack.MAGENTA
colorama.ansi.AnsiBack.RED
colorama.ansi.AnsiBack.RESET
colorama.ansi.AnsiBack.WHITE
colorama.ansi.AnsiBack.YELLOW
colorama.ansi.AnsiFore.BLACK
colorama.ansi.AnsiFore.BLUE
colorama.ansi.AnsiFore.CYAN
colorama.ansi.AnsiFore.GREEN
colorama.ansi.AnsiFore.LIGHTBLACK_EX
colorama.ansi.AnsiFore.LIGHTBLUE_EX
colorama.ansi.AnsiFore.LIGHTCYAN_EX
colorama.ansi.AnsiFore.LIGHTGREEN_EX
colorama.ansi.AnsiFore.LIGHTMAGENTA_EX
colorama.ansi.AnsiFore.LIGHTRED_EX
colorama.ansi.AnsiFore.LIGHTWHITE_EX
colorama.ansi.AnsiFore.LIGHTYELLOW_EX
colorama.ansi.AnsiFore.MAGENTA
colorama.ansi.AnsiFore.RED
colorama.ansi.AnsiFore.RESET
colorama.ansi.AnsiFore.WHITE
colorama.ansi.AnsiFore.YELLOW
colorama.ansi.AnsiStyle.BRIGHT
colorama.ansi.AnsiStyle.DIM
colorama.ansi.AnsiStyle.NORMAL
colorama.ansi.AnsiStyle.RESET_ALL
# These are defined as None, but on initialization are set to correct values:
colorama.initialise.wrapped_stderr
colorama.initialise.wrapped_stdout
# Not planning on writing stubs for tests:
colorama.tests.*

View File

@ -1,7 +0,0 @@
# These are only available on Windows:
colorama.winterm.WinColor
colorama.winterm.WinStyle
colorama.winterm.WinTerm
# A re-export that's an implementation detail:
colorama.winterm.get_osfhandle

View File

@ -1,8 +0,0 @@
dateparser.calendars.hijri
dateparser.calendars.hijri_parser
dateparser.calendars.jalali
dateparser.calendars.jalali_parser
dateparser.search.detection.BaseLanguageDetector.iterate_applicable_languages
# Timezone and other internal data:
dateparser.data.date_translation_data.*

View File

@ -1,9 +0,0 @@
decorator.ContextManager.__init__
decorator.FunctionMaker.args
decorator.FunctionMaker.kwonlyargs
decorator.FunctionMaker.kwonlydefaults
decorator.FunctionMaker.varargs
decorator.FunctionMaker.varkw
decorator.decorate
decorator.decorator
decorator.get_init

View File

@ -1,24 +0,0 @@
docutils.TransformSpec.unknown_reference_resolvers
docutils.frontend.ConfigParser.__getattr__
docutils.frontend.ConfigParser.read
docutils.frontend.OptionParser.__getattr__
docutils.io.FileOutput.__getattr__
docutils.io.FileOutput.__init__
docutils.io.Input.__init__
docutils.languages.LanguageImporter.__getattr__
docutils.nodes.Element.__getattr__
docutils.nodes.NodeVisitor.__getattr__
docutils.nodes.document.__getattr__
docutils.nodes.document.__init__
docutils.nodes.Element.__iter__ # doesn't exist at runtime, but the class is iterable due to __getitem__
docutils.parsers.rst.Directive.__getattr__
docutils.transforms.Transform.__getattr__
docutils.transforms.Transformer.__getattr__
docutils.utils.Reporter.__getattr__
docutils.parsers.recommonmark_wrapper
# the constructor appears to be mostly internal API, public API users are meant to use docutils.utils.new_reporter instead
docutils.utils.Reporter.__init__
# these methods take a rawsource parameter that has been deprecated and is completely ignored, so we omit it from the stub
docutils.nodes.Text.__new__

View File

@ -1,2 +0,0 @@
# Not public API -- the submodule is an implementation detail due to it being a cythonized package
editdistance.bycython

View File

@ -1,2 +0,0 @@
# staticmethod weirdness:
entrypoints.CaseSensitiveConfigParser.optionxform

View File

@ -1 +0,0 @@
bugbear.BugBearChecker.__getattr__

View File

@ -1,6 +0,0 @@
flake8_plugin_utils
flake8_plugin_utils.plugin
flake8_plugin_utils.utils
flake8_plugin_utils.utils.assertions
flake8_plugin_utils.utils.constants
flake8_plugin_utils.utils.equiv_nodes

View File

@ -1,16 +0,0 @@
# Argument has default at runtime, but using it raises a TypeError.
fpdf.FPDF.set_creation_date
fpdf.fpdf.FPDF.set_creation_date
# fonttools shims since we can't import it
fpdf._fonttools_shims
# Checking the following function crashes stubtest 0.991, but seems to be
# fixed in later versions.
fpdf.FPDF.set_encryption
fpdf.fpdf.FPDF.set_encryption
# Runtime has some internal arguments.
fpdf.syntax.build_obj_dict
fpdf.ViewerPreferences.serialize
fpdf\.[a-z]+\.[A-Za-z]+\.serialize

View File

@ -1,4 +0,0 @@
# inconsistency of signatures between stub and implementation (cls vs self)
google.cloud.ndb.ModelAdapter.__new__
google.cloud.ndb.metadata.EntityGroup.__new__
google.cloud.ndb.model.ModelAdapter.__new__

View File

@ -1,6 +0,0 @@
# Are set to `None` by default, initialized later:
hdbcli.dbapi.Error.errorcode
hdbcli.dbapi.Error.errortext
hdbcli.dbapi.Warning.errorcode
hdbcli.dbapi.Warning.errortext
hdbcli.dbapi.ExecuteManyErrorEntry.rownumber

View File

@ -1,2 +0,0 @@
# __getattr__() replaced with actual field in stub
httplib2.Response.dict

View File

@ -1,11 +0,0 @@
humanfriendly.compat.StringIO.seek
humanfriendly.compat.StringIO.truncate
# Re-exports:
humanfriendly.usage.import_module
humanfriendly.compat.which
humanfriendly.compat.name2codepoint
humanfriendly.compat.monotonic
# Tests are not included into stubs:
humanfriendly.tests

View File

@ -1,23 +0,0 @@
# These are internal use and python 2 compatibility variables and functions
inifile.PY2
inifile.WIN
inifile.integer_types
inifile.iter_from_file
inifile.iteritems
inifile.reraise
inifile.string_types
# Attributes that should be treated as read-only and thus are annotated
# with @property
inifile.Dialect.ns_sep
inifile.Dialect.kv_sep
inifile.Dialect.quotes
inifile.Dialect.true
inifile.Dialect.false
inifile.Dialect.comments
inifile.Dialect.allow_escaping
inifile.Dialect.linesep
inifile.IniData.dialect
inifile.IniFile.filename
inifile.IniFile.encoding
inifile.IniFile.is_new

View File

@ -1,5 +0,0 @@
# scan_code *should* never be None in real use. This is also according to docs.
keyboard.KeyboardEvent.scan_code
keyboard._keyboard_event.KeyboardEvent.scan_code
# TODO: Should this be allowlisted?
keyboard.__main__

View File

@ -1,3 +0,0 @@
# Defaults don't align with possible values
keyboard.mouse.on_button
keyboard.mouse.wait

View File

@ -1,3 +0,0 @@
# Defaults don't align with possible values
keyboard.mouse.on_button
keyboard.mouse.wait

View File

@ -1,2 +0,0 @@
mock.patch
mock.mock.patch

View File

@ -1,6 +0,0 @@
mypy_extensions.FlexibleAlias
mypy_extensions.TypedDict
mypy_extensions.i64.*
mypy_extensions.i32.*
mypy_extensions.i16.*
mypy_extensions.u8.*

View File

@ -1,7 +0,0 @@
# Error: is not present in stub
# =============================
netaddr.core.a # This is a temporary module attribute used to detect python version
# Error: is not present at runtime
# ================================
netaddr.ip.iana.XMLRecordParser.__getattr__ # __init__ has `self.__dict__.update(kwargs)`

View File

@ -1 +0,0 @@
oauthlib.oauth1.rfc5849.parameters.prepare_headers

View File

@ -1,177 +0,0 @@
# "cls" argument has wrong name in implementation.
openpyxl.descriptors.slots.AutoSlotProperties.__new__
# Requires numpy to be installed
openpyxl.utils.dataframe
# Element can be imported from lxml or xml.etree, so the attributes can
# differ at runtime.
openpyxl.xml.functions.Element.*
# Fake getters
openpyxl\.descriptors\..*\.__get__
# Stubtest sees <class T> and type[T] as different: https://github.com/python/mypy/issues/13316
openpyxl.chart.descriptors.NumberFormatDescriptor.expected_type
openpyxl.chart.title.TitleDescriptor.expected_type
openpyxl.drawing.colors.ColorChoiceDescriptor.expected_type
openpyxl.styles.colors.ColorDescriptor.expected_type
# Stubtest doesn't like generics here
openpyxl\.descriptors\.(base\.)?Bool\.allow_none
openpyxl\.descriptors\.(base\.)?DateTime\.allow_none
openpyxl\.descriptors\.(base\.)?Float\.allow_none
openpyxl\.descriptors\.(base\.)?Integer\.allow_none
openpyxl\.descriptors\.(base\.)?MatchPattern\.allow_none
openpyxl\.descriptors\.(base\.)?Max\.allow_none
openpyxl\.descriptors\.(base\.)?Min\.allow_none
openpyxl\.descriptors\.(base\.)?MinMax\.allow_none
openpyxl\.descriptors\.(base\.)?String\.allow_none
openpyxl\.descriptors\.(base\.)?Typed\.allow_none
# "has a default value but stub argument does not"
# Runtime has default arguments that would fail
openpyxl.cell.text.PhoneticProperties.__init__
openpyxl.cell.text.PhoneticText.__init__
openpyxl.chart.chartspace.ChartSpace.__init__
openpyxl.chart.chartspace.ExternalData.__init__
openpyxl.chart.data_source.NumFmt.__init__
openpyxl.chart.data_source.NumVal.__init__
openpyxl.chartsheet.custom.CustomChartsheetView.__init__
openpyxl.chartsheet.publish.WebPublishItem.__init__
openpyxl.comments.comment_sheet.CommentSheet.__init__
openpyxl.comments.comment_sheet.Properties.__init__
openpyxl.descriptors.excel.Extension.__init__
openpyxl.drawing.colors.HSLColor.__init__
openpyxl.drawing.colors.RGBPercent.__init__
openpyxl.drawing.colors.SchemeColor.__init__
openpyxl.drawing.connector.Connection.__init__
openpyxl.drawing.connector.ConnectorNonVisual.__init__
openpyxl.drawing.connector.ConnectorShape.__init__
openpyxl.drawing.connector.Shape.__init__
openpyxl.drawing.connector.ShapeMeta.__init__
openpyxl.drawing.effect.AlphaBiLevelEffect.__init__
openpyxl.drawing.effect.AlphaModulateEffect.__init__
openpyxl.drawing.effect.AlphaModulateFixedEffect.__init__
openpyxl.drawing.effect.AlphaReplaceEffect.__init__
openpyxl.drawing.effect.BiLevelEffect.__init__
openpyxl.drawing.effect.BlurEffect.__init__
openpyxl.drawing.effect.ColorChangeEffect.__init__
openpyxl.drawing.effect.EffectContainer.__init__
openpyxl.drawing.effect.FillOverlayEffect.__init__
openpyxl.drawing.effect.GlowEffect.__init__
openpyxl.drawing.effect.HSLEffect.__init__
openpyxl.drawing.effect.InnerShadowEffect.__init__
openpyxl.drawing.effect.OuterShadow.__init__
openpyxl.drawing.effect.PresetShadowEffect.__init__
openpyxl.drawing.effect.ReflectionEffect.__init__
openpyxl.drawing.effect.SoftEdgesEffect.__init__
openpyxl.drawing.fill.LinearShadeProperties.__init__
openpyxl.drawing.fill.PathShadeProperties.__init__
openpyxl.drawing.fill.TileInfoProperties.__init__
openpyxl.drawing.geometry.Backdrop.__init__
openpyxl.drawing.geometry.Bevel.__init__
openpyxl.drawing.geometry.Camera.__init__
openpyxl.drawing.geometry.ConnectionSite.__init__
openpyxl.drawing.geometry.CustomGeometry2D.__init__
openpyxl.drawing.geometry.GeomGuide.__init__
openpyxl.drawing.geometry.LightRig.__init__
openpyxl.drawing.geometry.Path2D.__init__
openpyxl.drawing.geometry.Point3D.__init__
openpyxl.drawing.geometry.PositiveSize2D.__init__
openpyxl.drawing.geometry.PresetGeometry2D.__init__
openpyxl.drawing.geometry.Scene3D.__init__
openpyxl.drawing.geometry.ShapeStyle.__init__
openpyxl.drawing.geometry.SphereCoords.__init__
openpyxl.drawing.geometry.StyleMatrixReference.__init__
openpyxl.drawing.geometry.Vector3D.__init__
openpyxl.drawing.graphic.GroupShape.__init__
openpyxl.drawing.properties.NonVisualDrawingProps.__init__
openpyxl.drawing.properties.NonVisualGroupShape.__init__
openpyxl.drawing.text.AutonumberBullet.__init__
openpyxl.drawing.text.Font.__init__
openpyxl.drawing.text.GeomGuide.__init__
openpyxl.drawing.text.PresetTextShape.__init__
openpyxl.drawing.text.TextField.__init__
openpyxl.drawing.text.TextNormalAutofit.__init__
openpyxl.packaging.relationship.Relationship.__init__
openpyxl.packaging.workbook.ChildSheet.__init__
openpyxl.packaging.workbook.PivotCache.__init__
openpyxl.pivot.cache.CacheDefinition.__init__
openpyxl.pivot.cache.CacheField.__init__
openpyxl.pivot.cache.CacheHierarchy.__init__
openpyxl.pivot.cache.CacheSource.__init__
openpyxl.pivot.cache.CalculatedItem.__init__
openpyxl.pivot.cache.CalculatedMember.__init__
openpyxl.pivot.cache.DiscretePr.__init__
openpyxl.pivot.cache.FieldsUsage.__init__
openpyxl.pivot.cache.FieldUsage.__init__
openpyxl.pivot.cache.GroupLevel.__init__
openpyxl.pivot.cache.GroupLevels.__init__
openpyxl.pivot.cache.GroupMember.__init__
openpyxl.pivot.cache.GroupMembers.__init__
openpyxl.pivot.cache.Groups.__init__
openpyxl.pivot.cache.LevelGroup.__init__
openpyxl.pivot.cache.MeasureGroup.__init__
openpyxl.pivot.cache.OLAPSet.__init__
openpyxl.pivot.cache.OLAPSets.__init__
openpyxl.pivot.cache.PageItem.__init__
openpyxl.pivot.cache.PCDKPI.__init__
openpyxl.pivot.cache.PCDSDTCEntries.__init__
openpyxl.pivot.cache.PivotDimension.__init__
openpyxl.pivot.cache.Query.__init__
openpyxl.pivot.cache.QueryCache.__init__
openpyxl.pivot.cache.RangeSet.__init__
openpyxl.pivot.fields.Error.__init__
openpyxl.pivot.fields.Number.__init__
openpyxl.pivot.fields.Tuple.__init__
openpyxl.pivot.fields.TupleList.__init__
openpyxl.pivot.table.AutoSortScope.__init__
openpyxl.pivot.table.ChartFormat.__init__
openpyxl.pivot.table.ConditionalFormat.__init__
openpyxl.pivot.table.DataField.__init__
openpyxl.pivot.table.Format.__init__
openpyxl.pivot.table.HierarchyUsage.__init__
openpyxl.pivot.table.Location.__init__
openpyxl.pivot.table.MemberProperty.__init__
openpyxl.pivot.table.PageField.__init__
openpyxl.pivot.table.PivotFilter.__init__
openpyxl.pivot.table.PivotFilters.__init__
openpyxl.pivot.table.RowColField.__init__
openpyxl.pivot.table.TableDefinition.__init__
openpyxl.styles.named_styles._NamedCellStyle.__init__
openpyxl.styles.numbers.NumberFormat.__init__
openpyxl.styles.table.TableStyle.__init__
openpyxl.styles.table.TableStyleElement.__init__
openpyxl.workbook.defined_name.DefinedName.__init__
openpyxl.workbook.external_link.external.ExternalCell.__init__
openpyxl.workbook.external_link.external.ExternalDefinedName.__init__
openpyxl.workbook.external_link.external.ExternalRow.__init__
openpyxl.workbook.external_link.external.ExternalSheetData.__init__
openpyxl.workbook.function_group.FunctionGroup.__init__
openpyxl.workbook.views.CustomWorkbookView.__init__
openpyxl.workbook.web.WebPublishObject.__init__
openpyxl.worksheet.cell_watch.CellWatch.__init__
openpyxl.worksheet.controls.Control.__init__
openpyxl.worksheet.controls.ControlProperty.__init__
openpyxl.worksheet.custom.CustomProperty.__init__
openpyxl.worksheet.dimensions.RowDimension.__init__
openpyxl.worksheet.dimensions.SheetDimension.__init__
openpyxl.worksheet.filters.DateGroupItem.__init__
openpyxl.worksheet.filters.DynamicFilter.__init__
openpyxl.worksheet.filters.FilterColumn.__init__
openpyxl.worksheet.filters.IconFilter.__init__
openpyxl.worksheet.filters.Top10.__init__
openpyxl.worksheet.hyperlink.Hyperlink.__init__
openpyxl.worksheet.ole.ObjectAnchor.__init__
openpyxl.worksheet.ole.ObjectPr.__init__
openpyxl.worksheet.ole.OleObject.__init__
openpyxl.worksheet.print_settings.RowRange.__init__
openpyxl.worksheet.scenario.InputCells.__init__
openpyxl.worksheet.scenario.Scenario.__init__
openpyxl.worksheet.smart_tag.CellSmartTag.__init__
openpyxl.worksheet.smart_tag.CellSmartTagPr.__init__
openpyxl.worksheet.smart_tag.CellSmartTags.__init__
openpyxl.worksheet.table.TableColumn.__init__
openpyxl.worksheet.table.XMLColumnProps.__init__

View File

@ -1,392 +0,0 @@
# Needed until mypy issues are solved
# pyright: reportUnnecessaryTypeIgnoreComment=false
from __future__ import annotations
from _typeshed import ReadableBuffer
from datetime import date, datetime, time
from typing import Any, List, Tuple, Union
from typing_extensions import Literal, assert_type
from openpyxl.descriptors import Strict
from openpyxl.descriptors.base import (
Bool,
Convertible,
DateTime,
Descriptor,
Float,
Integer,
Length,
MatchPattern,
MinMax,
NoneSet,
Set,
String,
Typed,
)
from openpyxl.descriptors.serialisable import Serialisable
class WithDescriptors(Serialisable):
descriptor = Descriptor[str]()
typed_default = Typed(expected_type=str)
typed_not_none = Typed(expected_type=str, allow_none=False)
typed_none = Typed(expected_type=str, allow_none=True)
set_tuple = Set(values=("a", 1, 0.0))
set_list = Set(values=["a", 1, 0.0])
set_tuple_none = Set(values=("a", 1, 0.0, None))
noneset_tuple = NoneSet(values=("a", 1, 0.0))
noneset_list = NoneSet(values=["a", 1, 0.0])
length_tuple = Length[Tuple[str, str]](length=1) # Can't validate tuple length in a generic manner
length_list = Length[List[str]](length=1)
length_invalid = Length[object](length=1) # type: ignore
match_pattern_str_default = MatchPattern(pattern="")
match_pattern_str = MatchPattern(pattern="", allow_none=False)
match_pattern_str_none = MatchPattern(pattern="", allow_none=True)
match_pattern_bytes_default = MatchPattern(pattern=b"")
match_pattern_bytes = MatchPattern(pattern=b"", allow_none=False)
match_pattern_bytes_none = MatchPattern(pattern=b"", allow_none=True)
convertible_default = Convertible(expected_type=int)
convertible_not_none = Convertible(expected_type=int, allow_none=False)
convertible_none = Convertible(expected_type=int, allow_none=True)
# NOTE: min and max params are independent of expected_type since int and floats can always be compared together
minmax_default = MinMax(min=0, max=0)
minmax_float = MinMax(min=0, max=0, expected_type=float, allow_none=False)
minmax_float_none = MinMax(min=0, max=0, expected_type=float, allow_none=True)
minmax_int = MinMax(min=0.0, max=0.0, expected_type=int, allow_none=False)
minmax_int_none = MinMax(min=0.0, max=0.0, expected_type=int, allow_none=True)
bool_default = Bool()
bool_not_none = Bool(allow_none=False)
bool_none = Bool(allow_none=True)
datetime_default = DateTime()
datetime_not_none = DateTime(allow_none=False)
datetime_none = DateTime(allow_none=True)
string_default = String()
string_not_none = String(allow_none=False)
string_none = String(allow_none=True)
float_default = Float()
float_not_none = Float(allow_none=False)
float_none = Float(allow_none=True)
integer_default = Integer()
integer_not_none = Integer(allow_none=False)
integer_none = Integer(allow_none=True)
# Test inferred annotation
assert_type(descriptor, Descriptor[str])
assert_type(typed_default, Typed[str, Literal[False]])
assert_type(typed_not_none, Typed[str, Literal[False]])
assert_type(typed_none, Typed[str, Literal[True]])
assert_type(set_tuple, Set[Union[Literal["a", 1], float]]) # type: ignore[assert-type] # False-positive in mypy
assert_type(set_list, Set[Union[str, int, float]]) # type: ignore[assert-type] # False-positive in mypy # Literals are simplified in non-tuples
assert_type(set_tuple_none, Set[Union[Literal["a", 1, None], float]]) # type: ignore[assert-type] # False-positive in mypy
assert_type(noneset_tuple, NoneSet[Union[Literal["a", 1], float]]) # type: ignore[assert-type] # False-positive in mypy
assert_type(noneset_list, NoneSet[Union[str, float]]) # type: ignore[assert-type] # False-positive in mypy# int and float are merged in generic unions
assert_type(length_tuple, Length[Tuple[str, str]])
assert_type(length_list, Length[List[str]])
assert_type(match_pattern_str_default, MatchPattern[str, Literal[False]])
assert_type(match_pattern_str, MatchPattern[str, Literal[False]])
assert_type(match_pattern_str_none, MatchPattern[str, Literal[True]])
assert_type(match_pattern_bytes_default, MatchPattern[ReadableBuffer, Literal[False]])
assert_type(match_pattern_bytes, MatchPattern[ReadableBuffer, Literal[False]])
assert_type(match_pattern_bytes_none, MatchPattern[ReadableBuffer, Literal[True]])
assert_type(convertible_default, Convertible[int, Literal[False]])
assert_type(convertible_not_none, Convertible[int, Literal[False]])
assert_type(convertible_none, Convertible[int, Literal[True]])
assert_type(minmax_default, MinMax[float, Literal[False]])
assert_type(minmax_float, MinMax[float, Literal[False]])
assert_type(minmax_float_none, MinMax[float, Literal[True]])
assert_type(minmax_int, MinMax[int, Literal[False]])
assert_type(minmax_int_none, MinMax[int, Literal[True]])
assert_type(bool_default, Bool[Literal[False]])
assert_type(bool_not_none, Bool[Literal[False]])
assert_type(bool_none, Bool[Literal[True]])
assert_type(datetime_default, DateTime[Literal[False]])
assert_type(datetime_not_none, DateTime[Literal[False]])
assert_type(datetime_none, DateTime[Literal[True]])
assert_type(string_default, String[Literal[False]])
assert_type(string_not_none, String[Literal[False]])
assert_type(string_none, String[Literal[True]])
assert_type(float_default, Float[Literal[False]])
assert_type(float_not_none, Float[Literal[False]])
assert_type(float_none, Float[Literal[True]])
assert_type(integer_default, Integer[Literal[False]])
assert_type(integer_not_none, Integer[Literal[False]])
assert_type(integer_none, Integer[Literal[True]])
with_descriptors = WithDescriptors()
# Test with missing subclass
class NotSerialisable:
descriptor = Descriptor[Any]()
NotSerialisable().descriptor = None # type: ignore
# Test with Strict subclass
class WithDescriptorsStrict(Strict):
descriptor = Descriptor[Any]()
WithDescriptorsStrict().descriptor = None
# Test getters
assert_type(with_descriptors.descriptor, str)
assert_type(with_descriptors.typed_not_none, str) # type: ignore[assert-type] # False-positive in mypy
assert_type(with_descriptors.typed_none, Union[str, None])
assert_type(with_descriptors.set_tuple, Union[Literal["a", 1], float]) # type: ignore[assert-type] # False-positive in mypy
assert_type(with_descriptors.set_list, Union[str, int, float]) # type: ignore[assert-type] # False-positive in mypy # Literals are simplified in non-tuples
assert_type(with_descriptors.set_tuple_none, Union[Literal["a", 1, None], float]) # type: ignore[assert-type] # False-positive in mypy
assert_type(with_descriptors.noneset_tuple, Union[Literal["a", 1], float, None]) # type: ignore[assert-type] # False-positive in mypy
assert_type(with_descriptors.noneset_list, Union[str, float, None]) # type: ignore[assert-type] # False-positive in mypy # int and float are merged in generic unions
assert_type(with_descriptors.length_tuple, Tuple[str, str])
assert_type(with_descriptors.length_list, List[str])
assert_type(with_descriptors.match_pattern_str, str) # type: ignore[assert-type] # False-positive in mypy
assert_type(with_descriptors.match_pattern_str_none, Union[str, None])
assert_type(with_descriptors.match_pattern_bytes, ReadableBuffer) # type: ignore[assert-type] # False-positive in mypy
assert_type(with_descriptors.match_pattern_bytes_none, Union[ReadableBuffer, None])
assert_type(with_descriptors.convertible_not_none, int) # type: ignore[assert-type] # False-positive in mypy
assert_type(with_descriptors.convertible_none, Union[int, None])
assert_type(with_descriptors.minmax_float, float) # type: ignore[assert-type] # False-positive in mypy
assert_type(with_descriptors.minmax_float_none, Union[float, None])
assert_type(with_descriptors.minmax_int, int) # type: ignore[assert-type] # False-positive in mypy
assert_type(with_descriptors.minmax_int_none, Union[int, None])
assert_type(with_descriptors.bool_not_none, bool) # type: ignore[assert-type] # False-positive in mypy
assert_type(with_descriptors.bool_none, Union[bool, None])
assert_type(with_descriptors.datetime_not_none, datetime) # type: ignore[assert-type] # False-positive in mypy
assert_type(with_descriptors.datetime_none, Union[datetime, None])
assert_type(with_descriptors.string_not_none, str) # type: ignore[assert-type] # False-positive in mypy
assert_type(with_descriptors.string_none, Union[str, None])
assert_type(with_descriptors.float_not_none, float) # type: ignore[assert-type] # False-positive in mypy
assert_type(with_descriptors.float_none, Union[float, None])
assert_type(with_descriptors.integer_not_none, int) # type: ignore[assert-type] # False-positive in mypy
assert_type(with_descriptors.integer_none, Union[int, None])
# Test setters (expected type, None, unexpected type)
with_descriptors.descriptor = ""
with_descriptors.descriptor = None # type: ignore
with_descriptors.descriptor = 0 # type: ignore
with_descriptors.typed_not_none = ""
with_descriptors.typed_not_none = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.typed_not_none = 0 # type: ignore
with_descriptors.typed_none = ""
with_descriptors.typed_none = None
with_descriptors.typed_none = 0 # type: ignore
# NOTE: Can't check Set for literal int wen used with a float because any int is a vlaid float
with_descriptors.set_tuple = "a"
with_descriptors.set_tuple = 0
with_descriptors.set_tuple = 0.0
with_descriptors.set_tuple = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.set_tuple = "none" # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.set_tuple = object() # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.set_list = "a"
with_descriptors.set_list = 0
with_descriptors.set_list = 0.0
with_descriptors.set_list = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.set_list = "none" # can't check literals validity
with_descriptors.set_list = object() # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.set_tuple_none = "a"
with_descriptors.set_tuple_none = 0
with_descriptors.set_tuple_none = 0.0
with_descriptors.set_tuple_none = None
with_descriptors.set_tuple_none = "none" # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.set_tuple_none = object() # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.noneset_tuple = "a"
with_descriptors.noneset_tuple = 0
with_descriptors.noneset_tuple = 0.0
with_descriptors.noneset_tuple = None
with_descriptors.noneset_tuple = "none"
with_descriptors.noneset_tuple = object() # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.noneset_list = "a"
with_descriptors.noneset_list = 0
with_descriptors.noneset_list = 0.0
with_descriptors.noneset_list = None
with_descriptors.noneset_list = "none"
with_descriptors.noneset_list = object() # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
# NOTE: Can't validate tuple length in a generic manner
with_descriptors.length_tuple = ("a", "a")
with_descriptors.length_tuple = None # type: ignore
with_descriptors.length_tuple = ["a", "a"] # type: ignore
with_descriptors.length_tuple = "" # type: ignore
with_descriptors.length_list = ["a", "a"]
with_descriptors.length_list = None # type: ignore
with_descriptors.length_list = ("a", "a") # type: ignore
with_descriptors.length_list = "" # type: ignore
with_descriptors.match_pattern_str = ""
with_descriptors.match_pattern_str = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.match_pattern_str = b"" # type: ignore
with_descriptors.match_pattern_str = 0 # type: ignore
with_descriptors.match_pattern_str_none = ""
with_descriptors.match_pattern_str_none = None
with_descriptors.match_pattern_str_none = b"" # type: ignore
with_descriptors.match_pattern_str_none = 0 # type: ignore
with_descriptors.match_pattern_bytes = b""
with_descriptors.match_pattern_bytes = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.match_pattern_bytes = "" # type: ignore
with_descriptors.match_pattern_bytes = 0 # type: ignore
with_descriptors.match_pattern_bytes_none = b""
with_descriptors.match_pattern_bytes_none = None
with_descriptors.match_pattern_bytes_none = "" # type: ignore
with_descriptors.match_pattern_bytes_none = 0 # type: ignore
with_descriptors.convertible_not_none = 0
with_descriptors.convertible_not_none = "0"
with_descriptors.convertible_not_none = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.convertible_not_none = object() # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.convertible_none = 0
with_descriptors.convertible_none = "0"
with_descriptors.convertible_none = None
with_descriptors.convertible_none = object() # FIXME: False positive(?) in pyright and mypy
with_descriptors.minmax_float = 0
with_descriptors.minmax_float = "0"
with_descriptors.minmax_float = 0.0
with_descriptors.minmax_float = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.minmax_float = object() # type: ignore
with_descriptors.minmax_float_none = 0
with_descriptors.minmax_float_none = "0"
with_descriptors.minmax_float_none = 0.0
with_descriptors.minmax_float_none = None
with_descriptors.minmax_float_none = object() # type: ignore
with_descriptors.minmax_int = 0
with_descriptors.minmax_int = "0"
with_descriptors.minmax_int = 0.0
with_descriptors.minmax_int = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.minmax_int = object() # type: ignore
with_descriptors.minmax_int_none = 0
with_descriptors.minmax_int_none = "0"
with_descriptors.minmax_int_none = 0.0
with_descriptors.minmax_int_none = None
with_descriptors.minmax_int_none = object() # type: ignore
with_descriptors.bool_not_none = False
with_descriptors.bool_not_none = "0"
with_descriptors.bool_not_none = 0
with_descriptors.bool_not_none = None
with_descriptors.bool_not_none = 0.0 # type: ignore
with_descriptors.bool_not_none = object() # type: ignore
with_descriptors.bool_none = False
with_descriptors.bool_none = "0"
with_descriptors.bool_none = 0
with_descriptors.bool_none = None
with_descriptors.bool_none = 0.0 # type: ignore
with_descriptors.bool_none = object() # type: ignore
with_descriptors.datetime_not_none = datetime(0, 0, 0)
with_descriptors.datetime_not_none = ""
with_descriptors.datetime_not_none = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.datetime_not_none = 0 # type: ignore
with_descriptors.datetime_not_none = date(0, 0, 0) # type: ignore
with_descriptors.datetime_not_none = time() # type: ignore
with_descriptors.datetime_none = datetime(0, 0, 0)
with_descriptors.datetime_none = ""
with_descriptors.datetime_none = None
with_descriptors.datetime_none = 0 # type: ignore
with_descriptors.datetime_none = date(0, 0, 0) # type: ignore
with_descriptors.datetime_none = time() # type: ignore
with_descriptors.string_not_none = ""
with_descriptors.string_not_none = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.string_not_none = 0 # type: ignore
with_descriptors.string_none = ""
with_descriptors.string_none = None
with_descriptors.string_none = 0 # type: ignore
with_descriptors.float_not_none = 0
with_descriptors.float_not_none = 0.0
with_descriptors.float_not_none = "0"
with_descriptors.float_not_none = b"0"
with_descriptors.float_not_none = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.float_not_none = object() # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.float_none = 0
with_descriptors.float_none = 0.0
with_descriptors.float_none = "0"
with_descriptors.float_none = b"0"
with_descriptors.float_none = None
with_descriptors.float_none = object() # FIXME: False positive(?) in pyright and mypy
with_descriptors.integer_not_none = 0
with_descriptors.integer_not_none = 0.0
with_descriptors.integer_not_none = "0"
with_descriptors.integer_not_none = b"0"
with_descriptors.integer_not_none = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.integer_not_none = object() # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.integer_none = 0
with_descriptors.integer_none = 0.0
with_descriptors.integer_none = "0"
with_descriptors.integer_none = b"0"
with_descriptors.integer_none = None
with_descriptors.integer_none = object() # FIXME: False positive(?) in pyright and mypy

View File

@ -1,4 +0,0 @@
opentracing.harness.api_check
opentracing.harness.scope_check
opentracing.scope_managers.gevent
opentracing.scope_managers.tornado

View File

@ -1,3 +0,0 @@
paramiko.SFTPServer.__init__
paramiko.sftp_server.SFTPServer.__init__
paramiko.util.SupportsClose

View File

@ -1,2 +0,0 @@
paramiko._winapi
paramiko.win_pageant

View File

@ -1,2 +0,0 @@
paramiko._winapi
paramiko.win_pageant

View File

@ -1,2 +0,0 @@
# Type-checkers don't support architecture checks. So we have to Union
paramiko.win_pageant.ULONG_PTR

View File

@ -1,8 +0,0 @@
parsimonious.nodes.RuleDecoratorMeta.__new__
# Magic:
parsimonious.adhoc_expression
# Tests are shipped with the source, we ignore it:
parsimonious.tests
parsimonious\.tests\..*

View File

@ -1,50 +0,0 @@
# proxy module that uses some import magic incompatible with stubtest
passlib.hash
# django unsupported in stubs
passlib.ext.django.models
# uses @memoized_property at runtime, but @property in the stubs
passlib.crypto.digest.HashInfo.supported
passlib.crypto.digest.HashInfo.supported_by_fastpbkdf2
passlib.crypto.digest.HashInfo.supported_by_hashlib_pbkdf2
passlib.pwd.PhraseGenerator.symbol_count
passlib.pwd.SequenceGenerator.entropy
passlib.pwd.SequenceGenerator.entropy_per_symbol
passlib.pwd.SequenceGenerator.symbol_count
passlib.pwd.WordGenerator.symbol_count
passlib.totp.TotpMatch.cache_seconds
passlib.totp.TotpMatch.cache_time
passlib.totp.TotpMatch.expected_counter
passlib.totp.TotpMatch.expire_time
passlib.totp.TotpMatch.skipped
passlib.totp.TotpToken.expire_time
passlib.totp.TotpToken.start_time
# "hybrid" method that can be called on an instance or class
passlib.totp.TOTP.normalize_token
# import problem
passlib.utils.compat._ordered_dict
# initialized to None, but set by concrete sub-classes
passlib.handlers.pbkdf2.Pbkdf2DigestHandler.default_rounds
passlib.utils.handlers.GenericHandler.setting_kwds
# set to None on class level, but initialized in __init__
passlib.utils.handlers.HasManyIdents.ident
passlib.utils.handlers.HasRounds.rounds
# Errors in `__all__` at runtime:
# TODO: change after https://github.com/python/mypy/pull/14217 is released
passlib.handlers.oracle.__all__
passlib.handlers.oracle.oracle11g
passlib.handlers.oracle.oracle10g
passlib.handlers.mysql.__all__
passlib.handlers.mysql.mysq41
# Compat tools are ignored:
passlib.utils.compat.*
# Tests are not included:
passlib.tests.*

View File

@ -1,2 +0,0 @@
# Only exists if crypt is present
passlib.hosts.host_context

View File

@ -1,6 +0,0 @@
passpy.__main__
# Uses `git` dependency:
passpy.git
# Uses `gpg` dependency:
passpy.gpg

View File

@ -1,25 +0,0 @@
peewee.DQ.__invert__
peewee.DateField.day
peewee.DateField.month
peewee.DateField.year
peewee.DateTimeField.day
peewee.DateTimeField.hour
peewee.DateTimeField.minute
peewee.DateTimeField.month
peewee.DateTimeField.second
peewee.DateTimeField.year
peewee.Model.insert
peewee.Model.replace
peewee.Model.update
peewee.TimeField.hour
peewee.TimeField.minute
peewee.TimeField.second
peewee.TimestampField.day
peewee.TimestampField.hour
peewee.TimestampField.minute
peewee.TimestampField.month
peewee.TimestampField.second
peewee.TimestampField.year
peewee.Window.as_groups
peewee.Window.as_range
peewee.Window.as_rows

View File

@ -1,2 +0,0 @@
pep8ext_naming.NamingChecker.__getattr__
pep8ext_naming.NamingChecker.parse_options

View File

@ -1,18 +0,0 @@
# Inherited from stdlib's io module.
pika.compat.StringIO.seek
pika.compat.StringIO.truncate
# Stubtest doesn't understand that a property alias is also read-only.
# https://github.com/python/mypy/issues/13975
pika(\.adapters)?(\.blocking_connection)?\.BlockingConnection\.basic_nack
pika(\.adapters)?(\.blocking_connection)?\.BlockingConnection\.consumer_cancel_notify
pika(\.adapters)?(\.blocking_connection)?\.BlockingConnection\.exchange_exchange_bindings
pika(\.adapters)?(\.blocking_connection)?\.BlockingConnection\.publisher_confirms
# The implementation has defaults for the arguments that would make the
# created instances unusable, so we require the arguments in the stub.
pika.spec.Queue.DeclareOk.__init__
# Arguments have a sentinel default, which is not reflected in the stubs.
pika.ConnectionParameters.__init__
pika.connection.ConnectionParameters.__init__

View File

@ -1,41 +0,0 @@
# Generated pb2 methods diverge for a variety of reasons. They are tested
# carefully in mypy-protobuf which internally runs stubtest. Skip those here.
google.protobuf\..*_pb2\..*
# While Message and Descriptor are both defined with a null DESCRIPTOR,
# subclasses of Message and instances of EnumTypeWrapper require this value to
# be set, and since these type stubs are intended for use with protoc-generated
# python it's more accurate to make them non-nullable.
google.protobuf.internal.enum_type_wrapper.EnumTypeWrapper.DESCRIPTOR
google.protobuf.message.Message.DESCRIPTOR
# Exists at runtime, but via a __getitem__/__setitem__ hack
# See https://github.com/protocolbuffers/protobuf/blob/3ea30d80847cd9561db570ae7f673afc15523545/python/google/protobuf/message.py#L67
google.protobuf.message.Message.Extensions
# These are typed as (self, **kwargs) at runtime as thin wrapper functions
# around the underlying true typing. We prefer the true typing
google.protobuf.internal.containers.BaseContainer.sort
google.protobuf.message.Message.SerializePartialToString
google.protobuf.message.Message.SerializeToString
google.protobuf.text_format.MessageToBytes
# Stubbed as static method, but actually exists as a property that's
# a function. Typeshed's typing is more useful
google.protobuf.service.Service.GetDescriptor
# These are deliberately omitted in the stub.
# The classes can't be constructed directly anyway,
# so the signatures of their constructors are somewhat irrelevant.
google.protobuf.descriptor.Descriptor.__new__
google.protobuf.descriptor.ServiceDescriptor.__new__
# Set to None at runtime - which doesn't match the Sequence base class.
# It's a hack - just allow it.
google.protobuf.internal.containers.BaseContainer.__hash__
# Metaclass differs:
google.protobuf.descriptor.OneofDescriptor
# Runtime does not have __iter__ (yet...): hack in spirit of https://github.com/python/typeshed/issues/7813
google.protobuf.internal.well_known_types.ListValue.__iter__

View File

@ -1,17 +0,0 @@
from __future__ import annotations
from google.protobuf.struct_pb2 import ListValue, Struct
list_value = ListValue()
lst = list(list_value) # Ensure type checkers recognise that the class is iterable (doesn't have an `__iter__` method at runtime)
list_value[0] = 42.42
list_value[0] = "42"
list_value[0] = None
list_value[0] = True
list_value[0] = [42.42, "42", None, True, [42.42, "42", None, True], {"42": 42}]
list_value[0] = ListValue()
list_value[0] = Struct()
list_element = list_value[0]

View File

@ -1,13 +0,0 @@
# These super() dunders don't seem to be particularly useful,
# and having them pop up on autocomplete suggestions would be annoying
psutil._compat.super.__self__
psutil._compat.super.__self_class__
psutil._compat.super.__thisclass__
# Stubtest does not support these platforms
psutil._psaix
psutil._psbsd
psutil._pssunos
# Test utilities
psutil.tests.*

View File

@ -1,4 +0,0 @@
psutil._pslinux
psutil._psutil_linux
psutil._psutil_windows
psutil._pswindows

View File

@ -1,4 +0,0 @@
psutil._psosx
psutil._psutil_windows
psutil._psutil_osx
psutil._pswindows

View File

@ -1,6 +0,0 @@
psutil._pslinux
psutil._psosx
psutil._psutil_linux
psutil._psutil_osx
psutil._psutil_posix

View File

@ -1,5 +0,0 @@
psycopg2.connection
psycopg2.cursor
psycopg2.pool.AbstractConnectionPool.closeall
psycopg2.pool.AbstractConnectionPool.getconn
psycopg2.pool.AbstractConnectionPool.putconn

View File

@ -1 +0,0 @@
OpenSSL.SSL.Context.__getattr__

View File

@ -1,10 +0,0 @@
# type_check_only
pyasn1.type.base.NoValue.plug
# typeshed typing differences with runtime collections.OrderedDict and builtins.dict
pyasn1.codec.native.encoder.SequenceEncoder.protoDict
pyasn1.codec.native.encoder.SetEncoder.protoDict
# Attempted "__ne__" operation on ASN.1 schema object
pyasn1.type.base
pyasn1.type.univ

View File

@ -1,25 +0,0 @@
# These all have class-level defaults that differ from the instance attributes
pyflakes.messages.DuplicateArgument.message_args
pyflakes.messages.ForwardAnnotationSyntaxError.message_args
pyflakes.messages.FutureFeatureNotDefined.message_args
pyflakes.messages.ImportShadowedByLoopVar.message_args
pyflakes.messages.ImportStarUsage.message_args
pyflakes.messages.ImportStarUsed.message_args
pyflakes.messages.MultiValueRepeatedKeyLiteral.message_args
pyflakes.messages.MultiValueRepeatedKeyVariable.message_args
pyflakes.messages.PercentFormatExtraNamedArguments.message_args
pyflakes.messages.PercentFormatInvalidFormat.message_args
pyflakes.messages.PercentFormatMissingArgument.message_args
pyflakes.messages.PercentFormatPositionalCountMismatch.message_args
pyflakes.messages.PercentFormatUnsupportedFormatCharacter.message_args
pyflakes.messages.RedefinedWhileUnused.message_args
pyflakes.messages.StringDotFormatExtraNamedArguments.message_args
pyflakes.messages.StringDotFormatExtraPositionalArguments.message_args
pyflakes.messages.StringDotFormatInvalidFormat.message_args
pyflakes.messages.StringDotFormatMissingArgument.message_args
pyflakes.messages.UndefinedExport.message_args
pyflakes.messages.UndefinedLocal.message_args
pyflakes.messages.UndefinedName.message_args
pyflakes.messages.UnusedAnnotation.message_args
pyflakes.messages.UnusedImport.message_args
pyflakes.messages.UnusedVariable.message_args

View File

@ -1,44 +0,0 @@
# fake module, only exists once the app is frozen
pyi_splash
# Undocumented and clearly not meant to be exposed
PyInstaller\..+?\.logger
PyInstaller.__main__.generate_parser
PyInstaller.__main__.run_build
PyInstaller.__main__.run_makespec
PyInstaller.utils.hooks.conda.lib_dir
# A mix of modules meant to be private, and shallow incomplete type references for other modules
PyInstaller\.building\.\w+?
PyInstaller.building.build_main.*
PyInstaller.building.datastruct.unique_name
PyInstaller.depend.analysis.*
PyInstaller.isolated._parent.*
PyInstaller\.lib\.modulegraph\.modulegraph\.\w+?
# Most modules are not meant to be used, yet are not marked as private
PyInstaller.archive.*
PyInstaller.config
PyInstaller.configure
PyInstaller.depend.bindepend
PyInstaller.depend.bytecode
PyInstaller.depend.dylib
PyInstaller.depend.imphook
PyInstaller.depend.utils
PyInstaller.exceptions
PyInstaller.hooks.*
PyInstaller\.lib\.modulegraph\.\w+?
PyInstaller.loader.*
PyInstaller.log
PyInstaller.utils.cliutils.*
PyInstaller.utils.conftest
PyInstaller.utils.git
PyInstaller.utils.hooks.django
PyInstaller.utils.hooks.gi
PyInstaller.utils.hooks.qt
PyInstaller.utils.hooks.tcl_tk
PyInstaller.utils.misc
PyInstaller.utils.osx
PyInstaller.utils.run_tests
PyInstaller.utils.tests
PyInstaller\.utils\.win32\.\w+?

View File

@ -1,2 +0,0 @@
PyInstaller\.utils\.win32\.versioninfo\.\w+?
PyInstaller\.utils\.win32\.winmanifest\.\w+?

View File

@ -1,16 +0,0 @@
# These __init__ methods have *args, **kwargs arguments on some platforms, but not others
pynput.mouse.Controller.__init__
# stubtest issues with non-`type` metaclasses, see https://github.com/python/mypy/issues/13316
pynput.keyboard.Controller._Key
pynput.keyboard._base.Controller._Key
pynput.keyboard._dummy.Controller._Key
# Platform specific private utils:
pynput._util.xorg_keysyms
pynput._util.xorg
pynput._util.win32_vks
pynput._util.win32
pynput._util.uinput
pynput._util.darwin_vks
pynput._util.darwin

View File

@ -1,5 +0,0 @@
# These __init__ methods have *args, **kwargs arguments on some platforms, but not others
pynput.keyboard.Controller.__init__
# Platform specific implementation detail:
pynput.keyboard.Controller.keyboard_mapping

View File

@ -1,2 +0,0 @@
# These __init__ methods have *args, **kwargs arguments on some platforms, but not others
pynput.keyboard.Controller.__init__

View File

@ -1,62 +0,0 @@
# Error: failed to import
# =======================
serial.__main__ # SystemExit
serial.serialcli # (IronPython) ModuleNotFoundError: No module named 'System'
serial.serialjava # No Java Communications API implementation found
# Error: is inconsistent
# ======================
# These are positional only argument in the stub because they inherit from io.RawIOBase
# but at runtime they are normal arguments that don't have consistent names.
serial.Serial.write
serial.SerialBase.readinto
serial.serialutil.SerialBase.readinto
serial.rfc2217.Serial.write
serial.rs485.RS485.write
serial.urlhandler.protocol_cp2110.Serial.write
serial.urlhandler.protocol_loop.Serial.write
serial.urlhandler.protocol_rfc2217.Serial.write
serial.urlhandler.protocol_socket.Serial.write
serial.urlhandler.protocol_spy.Serial.write
# Error: is not present in stub
# =============================
# Python 2 compatibility
serial.basestring
serial.serialutil.basestring
serial.serialutil.iterbytes
serial.serialutil.to_bytes
# Deprecated aliases
serial.SerialBase.applySettingsDict
serial.SerialBase.flushInput
serial.SerialBase.flushOutput
serial.SerialBase.getCD
serial.SerialBase.getCTS
serial.SerialBase.getDSR
serial.SerialBase.getRI
serial.SerialBase.getSettingsDict
serial.SerialBase.inWaiting
serial.SerialBase.interCharTimeout
serial.SerialBase.isOpen
serial.SerialBase.sendBreak
serial.SerialBase.setDTR
serial.SerialBase.setPort
serial.SerialBase.setRTS
serial.SerialBase.writeTimeout
serial.serialutil.SerialBase.applySettingsDict
serial.serialutil.SerialBase.flushInput
serial.serialutil.SerialBase.flushOutput
serial.serialutil.SerialBase.getCD
serial.serialutil.SerialBase.getCTS
serial.serialutil.SerialBase.getDSR
serial.serialutil.SerialBase.getRI
serial.serialutil.SerialBase.getSettingsDict
serial.serialutil.SerialBase.inWaiting
serial.serialutil.SerialBase.interCharTimeout
serial.serialutil.SerialBase.isOpen
serial.serialutil.SerialBase.sendBreak
serial.serialutil.SerialBase.setDTR
serial.serialutil.SerialBase.setPort
serial.serialutil.SerialBase.setRTS
serial.serialutil.SerialBase.writeTimeout

View File

@ -1,16 +0,0 @@
# Error: failed to import
# =======================
serial.serialwin32 # Windows only
serial.win32 # Windows only
serial.tools.list_ports_windows # Windows only
# Error: is inconsistent
# ======================
# Methods defined with positional-only argument in the stub because they inherit from
# io.RawIOBase but at runtime they are normal arguments that don't have consistent
# names.
serial.serialposix.Serial.write
# intended to be private aliases
serial.tools.list_ports_posix.plat
serial.serialposix.plat

View File

@ -1,18 +0,0 @@
# Error: failed to import
# =======================
serial.serialwin32 # Windows only
serial.win32 # Windows only
serial.tools.list_ports_osx # Mac only
serial.tools.list_ports_windows # Windows only
# Error: is inconsistent
# ======================
# Methods defined with positional-only argument in the stub because they inherit from
# io.RawIOBase but at runtime they are normal arguments that don't have consistent
# names.
serial.serialposix.Serial.write
# Error: is missing from the stub (intended to be private aliases)
# ================================================================
serial.tools.list_ports_posix.plat
serial.serialposix.plat

View File

@ -1,12 +0,0 @@
# Error: failed to import
# =======================
serial.serialposix # Posix only
serial.tools.list_ports_osx # Mac only
serial.tools.list_ports_posix # Posix only
# Error: is inconsistent
# ======================
# Methods defined with positional-only argument in the stub because they inherit from
# io.RawIOBase but at runtime they are normal arguments that don't have consistent
# names.
serial.serialwin32.Serial.write

View File

@ -1,12 +0,0 @@
# Part of the pytest API, which is internal:
pytest_lazyfixture.pytest_.*
# Internal undocumented API:
pytest_lazyfixture.fillfixtures
pytest_lazyfixture.normalize_call
pytest_lazyfixture.normalize_metafunc_calls
pytest_lazyfixture.sorted_by_dependency
pytest_lazyfixture.copy_metafunc
# Compat:
pytest_lazyfixture.PY3

View File

@ -1,4 +0,0 @@
# Runtime only-hack that doesn't affect typing:
crontabs.CronTabs.__new__
# stub does not have *args argument "args", but function doesn't actually accept positional args
crontab.CronTab.remove_all

View File

@ -1,13 +0,0 @@
dateutil.parser._tzparser.__init__
dateutil.parser.parserinfo.convertyear
dateutil.rrule.weekday.__init__
dateutil.tz.tz.tzoffset.instance
dateutil.tz.tz.tzstr.instance
dateutil.tz.tzoffset.instance
dateutil.tz.tzstr.instance
# Metaclass differs:
dateutil.tz.tzoffset
dateutil.tz.tzutc
dateutil.tz.tz.tzoffset
dateutil.tz.tz.tzutc

View File

@ -1,9 +0,0 @@
from __future__ import annotations
from dateutil import relativedelta
# An illustrative example for why we re-export dateutil._common.weekday from dateutil.relativedelta in the stub
class Calendar:
def __init__(self, week_start: relativedelta.weekday = relativedelta.MO) -> None:
self.week_start = week_start

View File

@ -1,6 +0,0 @@
jose.backends.cryptography_backend
jose.backends.CryptographyAESKey
jose.backends.CryptographyECKey
jose.backends.CryptographyHMACKey
jose.backends.CryptographyRSAKey
jose.backends.ECDSAECKey

View File

@ -1,25 +0,0 @@
# Type helpers
Xlib._typing
# __all__ is a map at runtime
# https://github.com/python-xlib/python-xlib/pull/238
Xlib.ext(\.__all__)?
# These will unconditionally fail at runtime
# See: https://github.com/python-xlib/python-xlib/issues/253
Xlib.protocol.rq.DictWrapper.__gt__
Xlib.protocol.rq.DictWrapper.__lt__
Xlib.protocol.rq.Event.__gt__
Xlib.protocol.rq.Event.__lt__
# Can be None or str once instantiated
Xlib.protocol.rq.*.structcode
# Should only ever be str once instantiated
Xlib.protocol.rq.*.name
# Structs generate their attributes (@type_check_only)
Xlib.protocol.rq.Struct.__getattr__
# Iteration variable that bleeds into the global scope
Xlib.protocol.rq.c
Xlib.protocol.rq.size

View File

@ -1,5 +0,0 @@
# "Abstract" methods, see the .pyi file for more details.
pytz.BaseTzInfo.localize
pytz.BaseTzInfo.normalize
pytz.tzinfo.BaseTzInfo.localize
pytz.tzinfo.BaseTzInfo.normalize

View File

@ -1,74 +0,0 @@
# Not available at runtime. Contains type definitions that are otherwise not exposed
_win32typing
win32com(ext)?.mapi._exchdapi
win32._wincerapi
# PyWin tool / debugger
pythonwin.start_pythonwin
pythonwin.pywin.*
win32com.client.combrowse
win32com.client.tlbrowse
# Utilities to generate python bindings
win32com.client.build.*
win32com.client.CLSIDToClass
win32com.client.connect
# "dynamic.CDipatch" is necessary for mypy to not throw AssertionError
win32com.client.dynamic.*
win32com.client.gencache.*
win32com.client.genpy
win32com.client.makepy
win32com.client.selecttlb
win32com.client.util
win32com.makegw.*
(win32.lib.)?pywintypes.__import_pywin32_system_module__
# COM object servers scripts
win32com.server.factory
win32com.server.localserver
win32com.server.register
win32com.servers.*
# Active X Scripts
win32com(ext)?.axscript.client.framework
win32com(ext)?.axscript.client.pyscript_rexec
# "pyscript.pyi" is necessary for mypy to not fail due to missing stub
win32com(ext)?.axscript.client.pyscript.*
win32com(ext)?.axscript.client.scriptdispatch
# Other scripts
isapi.install
# Demos, tests and debugging
win32com.demos.*
win32com.servers.test_pycomtest
win32com.test.*
win32com(ext)?.axdebug.codecontainer
win32com(ext)?.axdebug.dump
win32com(ext)?.axdebug.debugger
win32com(ext)?.axscript.client.debug
win32com(ext)?.axscript.client.pydumper
win32com(ext)?.directsound.test.*
# Deprecated and obsolete
pythoncom.MakeIID
pythoncom.MakeTime
(win32.lib.)?win32pdhquery.Query.addperfcounter
# Deprecated and makes a buffer of random junk. Use something like `b"\x00" * bufferSize` instead
(win32.)?win(32|xp)gui.PyMakeBuffer
# failed to import, ImportError: DLL load failed while importing axdebug: The specified module could not be found.
win32com.axdebug.axdebug
win32com(ext)?.axdebug.codecontainer
# failed to import, ModuleNotFoundError: No module named 'gateways'
win32com(ext)?.axdebug.contexts
# failed to import, ModuleNotFoundError: No module named 'axdebug'
win32com(ext)?.axdebug.adb
win32com(ext)?.axdebug.documents
win32com(ext)?.axdebug.expressions
# failed to import, ModuleNotFoundError: No module named 'expressions'
win32com(ext)?.axdebug.stackframe
# Axdebug is not built on Python 3.11: https://github.com/mhammond/pywin32/blob/main/setup.py#L405
# failed to import, ImportError: cannot import name 'axdebug' from 'win32com.axdebug'
win32com.axdebug.gateways
win32comext.axdebug.gateways
# failed to import, ModuleNotFoundError: No module named 'win32comext.axdebug.axdebug'
win32comext.axdebug.axdebug

View File

@ -1,73 +0,0 @@
redis.client.Pipeline.transaction # instance attribute has same name as superclass method
# async def mismatch problems
redis.asyncio.client.Pipeline.command_info
redis.asyncio.client.Pipeline.debug_segfault
redis.asyncio.client.Pipeline.memory_doctor
redis.asyncio.client.Pipeline.memory_help
redis.asyncio.client.Pipeline.script_debug
redis.asyncio.client.Pipeline.shutdown
# unclear problems
redis.asyncio.Sentinel.master_for
redis.asyncio.Sentinel.slave_for
redis.asyncio.sentinel.Sentinel.master_for
redis.asyncio.sentinel.Sentinel.slave_for
redis.sentinel.Sentinel.master_for
redis.sentinel.Sentinel.slave_for
# Metaclass differs:
redis.RedisCluster
redis.asyncio.Redis
redis.asyncio.RedisCluster
redis.asyncio.client.Pipeline
redis.asyncio.client.Redis
redis.client.Pipeline
redis.client.Redis
redis.cluster.ClusterPipeline
redis.cluster.RedisCluster
redis.commands.AsyncCoreCommands
redis.commands.CoreCommands
redis.commands.RedisClusterCommands
redis.commands.cluster.ClusterDataAccessCommands
redis.commands.cluster.ClusterManagementCommands
redis.commands.cluster.ClusterMultiKeyCommands
redis.commands.cluster.RedisClusterCommands
redis.commands.core.ACLCommands
redis.commands.core.AsyncACLCommands
redis.commands.core.AsyncBasicKeyCommands
redis.commands.core.AsyncClusterCommands
redis.commands.core.AsyncCoreCommands
redis.commands.core.AsyncDataAccessCommands
redis.commands.core.AsyncGeoCommands
redis.commands.core.AsyncHashCommands
redis.commands.core.AsyncHyperlogCommands
redis.commands.core.AsyncListCommands
redis.commands.core.AsyncManagementCommands
redis.commands.core.AsyncModuleCommands
redis.commands.core.AsyncPubSubCommands
redis.commands.core.AsyncScanCommands
redis.commands.core.AsyncScriptCommands
redis.commands.core.AsyncSetCommands
redis.commands.core.AsyncSortedSetCommands
redis.commands.core.AsyncStreamCommands
redis.commands.core.BasicKeyCommands
redis.commands.core.ClusterCommands
redis.commands.core.CoreCommands
redis.commands.core.DataAccessCommands
redis.commands.core.GeoCommands
redis.commands.core.HashCommands
redis.commands.core.HyperlogCommands
redis.commands.core.ListCommands
redis.commands.core.ManagementCommands
redis.commands.core.ModuleCommands
redis.commands.core.PubSubCommands
redis.commands.core.ScanCommands
redis.commands.core.ScriptCommands
redis.commands.core.SetCommands
redis.commands.core.SortedSetCommands
redis.commands.core.StreamCommands
redis.commands.json.Pipeline
redis.commands.timeseries.Pipeline
redis.asyncio.cluster.ClusterPipeline
redis.asyncio.cluster.RedisCluster

View File

@ -1,18 +0,0 @@
# Not exported in C modules:
regex._regex.Splitter
regex._regex.Scanner
# Implementation details:
regex._regex.compile
regex._regex.copyright
regex._regex.fold_case
regex._regex.get_all_cases
regex._regex.get_code_size
regex._regex.get_expand_on_folding
regex._regex.get_properties
regex._regex.has_property_value
regex._regex.CODE_SIZE
regex._regex.MAGIC
# Tests:
regex.test_regex

View File

@ -1,11 +0,0 @@
from __future__ import annotations
from typing import List
from typing_extensions import assert_type
import regex
# Regression tests for #9263
assert_type(list(regex.finditer(r"foo", "foo")), List[regex.Match[str]])
pat = regex.compile(rb"foo")
assert_type(list(pat.finditer(b"foo")), List[regex.Match[bytes]])

View File

@ -1,11 +0,0 @@
# Re-exports from urllib3 (should be fixed in those stubs, not here)
requests\.adapters\.PoolManager\..*
requests\.adapters\.Retry\..*
# Loop variables that leak into the global scope
requests.packages.mod
requests.packages.package
requests.packages.target
# Alias for builtins.bytes
requests.compat.bytes.__buffer__

View File

@ -1,56 +0,0 @@
from __future__ import annotations
from collections.abc import Iterable
import requests
# =================================================================================================
# Regression test for #7988 (multiple files should be allowed for the "files" argument)
# This snippet comes from the requests documentation
# (https://requests.readthedocs.io/en/latest/user/advanced/#post-multiple-multipart-encoded-files),
# so should pass a type checker without error
# =================================================================================================
url = "https://httpbin.org/post"
multiple_files = [
("images", ("foo.png", open("foo.png", "rb"), "image/png")),
("images", ("bar.png", open("bar.png", "rb"), "image/png")),
]
r = requests.post(url, files=multiple_files)
# =================================================================================
# Tests for various different types being passed into the "data" parameter
# (These all return "Any", so there's not much value in using assert_type here.)
# (Just test that type checkers don't emit an error if it doesn't fail at runtime.)
# =================================================================================
# Arbitrary iterable
def gen() -> Iterable[bytes]:
yield b"foo"
yield b"bar"
requests.post("http://httpbin.org/anything", data=gen()).json()["data"]
# bytes
requests.post("http://httpbin.org/anything", data=b"foobar").json()["data"]
# str
requests.post("http://httpbin.org/anything", data="foobar").json()["data"]
# Files
requests.post("http://httpbin.org/anything", data=open("/tmp/foobar", "rb", encoding="UTF-8")).json()["data"]
requests.post("http://httpbin.org/anything", data=open("/tmp/foobar", "r", encoding="UTF-8")).json()["data"]
# Mappings
requests.post("http://httpbin.org/anything", data={b"foo": b"bar"}).json()["form"]
requests.post("http://httpbin.org/anything", data={"foo": "bar"}).json()["form"]
# mappings represented by an list/tuple of key-values pairs
requests.post("http://httpbin.org/anything", data=[(b"foo", b"bar")]).json()["form"]
requests.post("http://httpbin.org/anything", data=[("foo", "bar")]).json()["form"]
requests.post("http://httpbin.org/anything", data=((b"foo", b"bar"),)).json()["form"]
requests.post("http://httpbin.org/anything", data=(("foo", "bar"),)).json()["form"]

View File

@ -1,3 +0,0 @@
retry.compat
retry.tests
retry.tests.test_retry

View File

@ -1,65 +0,0 @@
# These are used like protocols, but forgot to specify "self" as the first method param
pkg_resources.IResourceProvider.get_resource_filename
pkg_resources.IResourceProvider.get_resource_stream
pkg_resources.IResourceProvider.get_resource_string
pkg_resources.IResourceProvider.has_resource
pkg_resources.IResourceProvider.resource_isdir
pkg_resources.IResourceProvider.resource_listdir
pkg_resources.IMetadataProvider.get_metadata
pkg_resources.IMetadataProvider.get_metadata_lines
pkg_resources.IMetadataProvider.has_metadata
pkg_resources.IMetadataProvider.metadata_isdir
pkg_resources.IMetadataProvider.metadata_listdir
pkg_resources.IMetadataProvider.run_script
# Is always set in __init__
pkg_resources.PathMetadata.egg_info
pkg_resources.EggMetadata.loader
# 1 used for True as a default value
setuptools._distutils.dist.Distribution.get_command_obj
# Dynamically created in __init__
setuptools._distutils.dist.Distribution.get_name
setuptools._distutils.dist.Distribution.get_version
setuptools._distutils.dist.Distribution.get_fullname
setuptools._distutils.dist.Distribution.get_author
setuptools._distutils.dist.Distribution.get_author_email
setuptools._distutils.dist.Distribution.get_maintainer
setuptools._distutils.dist.Distribution.get_maintainer_email
setuptools._distutils.dist.Distribution.get_contact
setuptools._distutils.dist.Distribution.get_contact_email
setuptools._distutils.dist.Distribution.get_url
setuptools._distutils.dist.Distribution.get_license
setuptools._distutils.dist.Distribution.get_licence
setuptools._distutils.dist.Distribution.get_description
setuptools._distutils.dist.Distribution.get_long_description
setuptools._distutils.dist.Distribution.get_keywords
setuptools._distutils.dist.Distribution.get_platforms
setuptools._distutils.dist.Distribution.get_classifiers
setuptools._distutils.dist.Distribution.get_download_url
setuptools._distutils.dist.Distribution.get_requires
setuptools._distutils.dist.Distribution.get_provides
setuptools._distutils.dist.Distribution.get_obsoletes
# Not supported by typeshed
setuptools.py34compat
setuptools.command.py36compat
# Private modules
setuptools.config._validate_pyproject.*
setuptools.command.build_py.build_py.existing_egg_info_dir
# Loop variable leak
setuptools.sandbox.AbstractSandbox.name
# Vendored and modified version of stdlib's distutils. Basically implementation details
setuptools._distutils.*
# Other vendored code
setuptools._vendor.*
pkg_resources._vendor.*
# Deprecated in favor of importlib.resources, importlib.metadata and their backports
# So like distutils, we only add what we need to reference.
pkg_resources.AvailableDistributions
pkg_resources.ResourceManager
pkg_resources.extern

View File

@ -1,54 +0,0 @@
from __future__ import annotations
from typing import Any
from pkg_resources import (
DefaultProvider,
EggMetadata,
EggProvider,
EmptyProvider,
FileMetadata,
IMetadataProvider,
IResourceProvider,
NullProvider,
PathMetadata,
ZipProvider,
)
from setuptools.command.editable_wheel import EditableStrategy, _LinkTree, _StaticPth, _TopLevelFinder
from setuptools.config.expand import EnsurePackagesDiscovered
from setuptools.config.pyprojecttoml import _EnsurePackagesDiscovered
# We don't care about the __init__ methods, only about if an instance respects the Protocol
_: Any = object()
# Test IMetadataProvider Protocol implementers
metadata_provider: IMetadataProvider
metadata_provider = NullProvider(_)
metadata_provider = EggProvider(_)
metadata_provider = EmptyProvider()
metadata_provider = DefaultProvider(_)
metadata_provider = ZipProvider(_)
metadata_provider = FileMetadata(_)
metadata_provider = PathMetadata(_, _)
metadata_provider = EggMetadata(_)
# Test IResourceProvider Protocol implementers
resource_provider: IResourceProvider
resource_provider = NullProvider(_)
resource_provider = EggProvider(_)
resource_provider = EmptyProvider()
resource_provider = DefaultProvider(_)
resource_provider = ZipProvider(_)
resource_provider = FileMetadata(_)
resource_provider = PathMetadata(_, _)
resource_provider = EggMetadata(_)
# Test EditableStrategy Protocol implementers
editable_strategy: EditableStrategy
editable_strategy = _StaticPth(_, _, _)
editable_strategy = _LinkTree(_, _, _, _)
editable_strategy = _TopLevelFinder(_, _)
# Not EditableStrategy due to incompatible __call__ method
editable_strategy = EnsurePackagesDiscovered(_) # type: ignore
editable_strategy = _EnsurePackagesDiscovered(_, _, _) # type: ignore

Some files were not shown because too many files have changed in this diff Show More