Improve stubs for email.headerregistry (#6588)

* Add max_count class vars
* Add init() methods
* Fix ContentDispositionHeader.content_disposition return type
This commit is contained in:
Alex Waygood
2021-12-16 11:42:07 +00:00
committed by GitHub
parent d7263a6dbf
commit 3d9599cec1
5 changed files with 36 additions and 29 deletions

View File

@@ -153,7 +153,6 @@ distutils.dist.DistributionMetadata.set_classifiers
distutils.dist.DistributionMetadata.set_keywords
distutils.dist.DistributionMetadata.set_platforms
distutils.util.get_host_platform
email.headerregistry.MessageIDHeader.max_count
lib2to3.pgen2.tokenize.COLONEQUAL
multiprocessing.managers.SharedMemoryServer.create
multiprocessing.managers.SharedMemoryServer.list_segments

View File

@@ -133,7 +133,6 @@ dummy_threading.main_thread
dummy_threading.setprofile
dummy_threading.settrace
dummy_threading.stack_size
email.headerregistry.MessageIDHeader.max_count
html.parser.HTMLParser.unescape
lib2to3.pgen2.tokenize.COLONEQUAL
multiprocessing.managers.SharedMemoryServer.create

View File

@@ -133,7 +133,6 @@ distutils.dist.DistributionMetadata.set_platforms
distutils.sysconfig.expand_makefile_vars
distutils.sysconfig.get_python_version
distutils.util.get_host_platform
email.headerregistry.MessageIDHeader.max_count
hmac.HMAC.digest_cons
hmac.HMAC.inner
hmac.HMAC.outer

View File

@@ -82,7 +82,6 @@ difflib.SequenceMatcher.__init__ # mypy default value for generic parameter iss
distutils.command.bdist_packager # It exists in docs as package name but not in code except as a mention in a comment.
distutils.version.Version._cmp # class should have declared this
distutils.version.Version.parse # class should have declared this
email.headerregistry.BaseHeader.max_count # docs say subclasses should have this property
# Enum `name` and `value` are special properties that exists at runtime, but stubtest can't detect
# https://github.com/python/typeshed/pull/6576#issuecomment-992538677
enum.Enum.name
@@ -562,23 +561,6 @@ email.errors
email.feedparser
email.generator
email.header
email.headerregistry.AddressHeader.init
email.headerregistry.AddressHeader.max_count
email.headerregistry.ContentDispositionHeader.init
email.headerregistry.ContentTransferEncodingHeader.init
email.headerregistry.ContentTransferEncodingHeader.max_count
email.headerregistry.ContentTypeHeader.init
email.headerregistry.DateHeader.init
email.headerregistry.DateHeader.max_count
email.headerregistry.MIMEVersionHeader.init
email.headerregistry.MIMEVersionHeader.max_count
email.headerregistry.ParameterizedMIMEHeader.init
email.headerregistry.ParameterizedMIMEHeader.max_count
email.headerregistry.UniqueAddressHeader.max_count
email.headerregistry.UniqueDateHeader.max_count
email.headerregistry.UniqueSingleAddressHeader.max_count
email.headerregistry.UniqueUnstructuredHeader.max_count
email.headerregistry.UnstructuredHeader.max_count
email.iterators
email.iterators.walk
email.message