From 85aec034ae1dfc7080878c6e69c624bc2987dff8 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Tue, 5 Apr 2022 07:37:24 +0100 Subject: [PATCH] Mark many attributes as read-only properties (#7591) --- stubs/JACK-Client/jack/__init__.pyi | 6 +- stubs/Pillow/PIL/TiffImagePlugin.pyi | 6 +- stubs/SQLAlchemy/sqlalchemy/engine/row.pyi | 6 +- .../sqlalchemy/ext/associationproxy.pyi | 3 +- stubs/SQLAlchemy/sqlalchemy/sql/schema.pyi | 3 +- .../SQLAlchemy/sqlalchemy/sql/selectable.pyi | 6 +- stubs/babel/babel/core.pyi | 12 +- stubs/babel/babel/messages/catalog.pyi | 3 +- stubs/babel/babel/messages/plurals.pyi | 9 +- stubs/babel/babel/plural.pyi | 3 +- .../beautifulsoup4/bs4/builder/_html5lib.pyi | 3 +- stubs/beautifulsoup4/bs4/element.pyi | 3 +- stubs/boto/boto/connection.pyi | 6 +- .../hazmat/primitives/asymmetric/dh.pyi | 3 +- .../hazmat/primitives/asymmetric/utils.pyi | 3 +- .../cryptography/hazmat/primitives/hashes.pyi | 11 +- .../cryptography/x509/__init__.pyi | 131 ++++++++++++------ .../cryptography/x509/extensions.pyi | 14 +- stubs/html5lib/html5lib/_inputstream.pyi | 3 +- .../html5lib/treebuilders/etree_lxml.pyi | 3 +- stubs/openpyxl/openpyxl/cell/cell.pyi | 3 +- .../openpyxl/worksheet/_read_only.pyi | 6 +- .../openpyxl/worksheet/_write_only.pyi | 9 +- stubs/openpyxl/openpyxl/worksheet/merge.pyi | 3 +- .../openpyxl/openpyxl/worksheet/pagebreak.pyi | 6 +- stubs/passlib/passlib/utils/handlers.pyi | 3 +- stubs/setuptools/pkg_resources/__init__.pyi | 12 +- .../setuptools/command/egg_info.pyi | 3 +- 28 files changed, 189 insertions(+), 93 deletions(-) diff --git a/stubs/JACK-Client/jack/__init__.pyi b/stubs/JACK-Client/jack/__init__.pyi index 5d83f6ad0..b8faf4eb2 100644 --- a/stubs/JACK-Client/jack/__init__.pyi +++ b/stubs/JACK-Client/jack/__init__.pyi @@ -161,8 +161,10 @@ class Port: def unset_alias(self, alias: str) -> None: ... @property def uuid(self) -> str: ... - is_audio: bool = ... - is_midi: bool = ... + @property + def is_audio(self) -> bool: ... + @property + def is_midi(self) -> bool: ... @property def is_input(self) -> bool: ... @property diff --git a/stubs/Pillow/PIL/TiffImagePlugin.pyi b/stubs/Pillow/PIL/TiffImagePlugin.pyi index 7fb5cb47f..d56baa35c 100644 --- a/stubs/Pillow/PIL/TiffImagePlugin.pyi +++ b/stubs/Pillow/PIL/TiffImagePlugin.pyi @@ -122,8 +122,10 @@ class ImageFileDirectory_v2(MutableMapping[int, Any]): class ImageFileDirectory_v1(ImageFileDirectory_v2): def __init__(self, *args, **kwargs) -> None: ... - tags: Any - tagdata: Any + @property + def tags(self): ... + @property + def tagdata(self): ... tagtype: dict[int, int] @classmethod def from_v2(cls, original): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/engine/row.pyi b/stubs/SQLAlchemy/sqlalchemy/engine/row.pyi index 31167fca7..743be40f2 100644 --- a/stubs/SQLAlchemy/sqlalchemy/engine/row.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/engine/row.pyi @@ -14,8 +14,10 @@ KEY_OBJECTS_BUT_WARN: int KEY_OBJECTS_NO_WARN: int class Row(BaseRow, Sequence[Any], metaclass=abc.ABCMeta): - count: Any - index: Any + @property + def count(self): ... + @property + def index(self): ... def __contains__(self, key): ... __hash__: Any def __lt__(self, other): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/associationproxy.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/associationproxy.pyi index bc6e384dd..5b347fb31 100644 --- a/stubs/SQLAlchemy/sqlalchemy/ext/associationproxy.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/ext/associationproxy.pyi @@ -93,7 +93,8 @@ class _AssociationCollection: setter: Any parent: Any def __init__(self, lazy_collection, creator, getter, setter, parent) -> None: ... - col: Any + @property + def col(self): ... def __len__(self): ... def __bool__(self): ... __nonzero__: Any diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/schema.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/schema.pyi index 66b4197d6..57b79d90f 100644 --- a/stubs/SQLAlchemy/sqlalchemy/sql/schema.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/sql/schema.pyi @@ -92,7 +92,8 @@ class ForeignKey(DialectKWArgs, SchemaItem): **dialect_kw, ) -> None: ... def copy(self, schema: Any | None = ..., **kw): ... - target_fullname: Any + @property + def target_fullname(self): ... def references(self, table): ... def get_referent(self, table): ... @memoized_property diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/selectable.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/selectable.pyi index c1a9d2e18..abf7827e2 100644 --- a/stubs/SQLAlchemy/sqlalchemy/sql/selectable.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/sql/selectable.pyi @@ -70,7 +70,8 @@ class FromClause(roles.AnonymizedFromClauseRole, Selectable): def primary_key(self): ... @memoized_property def foreign_keys(self): ... - c: Any + @property + def c(self): ... LABEL_STYLE_NONE: Any LABEL_STYLE_TABLENAME_PLUS_COL: Any @@ -383,7 +384,8 @@ class ScalarSelect(roles.InElementRole, Generative, Grouping): def __init__(self, element) -> None: ... @property def columns(self) -> None: ... - c: Any + @property + def c(self): ... def where(self, crit) -> None: ... def self_group(self, **kwargs): ... def correlate(self, *fromclauses) -> None: ... diff --git a/stubs/babel/babel/core.pyi b/stubs/babel/babel/core.pyi index 9b936be5e..7bb4e9d08 100644 --- a/stubs/babel/babel/core.pyi +++ b/stubs/babel/babel/core.pyi @@ -21,13 +21,17 @@ class Locale: def __ne__(self, other): ... def __hash__(self): ... def get_display_name(self, locale: Any | None = ...): ... - display_name: Any + @property + def display_name(self): ... def get_language_name(self, locale: Any | None = ...): ... - language_name: Any + @property + def language_name(self): ... def get_territory_name(self, locale: Any | None = ...): ... - territory_name: Any + @property + def territory_name(self): ... def get_script_name(self, locale: Any | None = ...): ... - script_name: Any + @property + def script_name(self): ... @property def english_name(self): ... @property diff --git a/stubs/babel/babel/messages/catalog.pyi b/stubs/babel/babel/messages/catalog.pyi index 7a51975fb..2ed4dae1e 100644 --- a/stubs/babel/babel/messages/catalog.pyi +++ b/stubs/babel/babel/messages/catalog.pyi @@ -70,7 +70,8 @@ class Catalog: charset: Any | None = ..., fuzzy: bool = ..., ) -> None: ... - locale_identifier: Any + @property + def locale_identifier(self): ... header_comment: Any mime_headers: Any @property diff --git a/stubs/babel/babel/messages/plurals.pyi b/stubs/babel/babel/messages/plurals.pyi index 5f75160f3..9f87c986a 100644 --- a/stubs/babel/babel/messages/plurals.pyi +++ b/stubs/babel/babel/messages/plurals.pyi @@ -5,8 +5,11 @@ PLURALS: Any DEFAULT_PLURAL: Any class _PluralTuple(tuple[int, str]): - num_plurals: Any - plural_expr: Any - plural_forms: Any + @property + def num_plurals(self) -> int: ... + @property + def plural_expr(self) -> str: ... + @property + def plural_forms(self) -> str: ... def get_plural(locale=...): ... diff --git a/stubs/babel/babel/plural.pyi b/stubs/babel/babel/plural.pyi index ba142e139..5a22caa7e 100644 --- a/stubs/babel/babel/plural.pyi +++ b/stubs/babel/babel/plural.pyi @@ -9,7 +9,8 @@ class PluralRule: def parse(cls, rules): ... @property def rules(self): ... - tags: Any + @property + def tags(self): ... def __call__(self, n): ... def to_javascript(rule): ... diff --git a/stubs/beautifulsoup4/bs4/builder/_html5lib.pyi b/stubs/beautifulsoup4/bs4/builder/_html5lib.pyi index bf2032865..5fa502b00 100644 --- a/stubs/beautifulsoup4/bs4/builder/_html5lib.pyi +++ b/stubs/beautifulsoup4/bs4/builder/_html5lib.pyi @@ -58,7 +58,8 @@ class Element(Any): # html5lib.treebuilders.base.Node def cloneNode(self): ... def hasContent(self): ... def getNameTuple(self): ... - nameTuple: Any + @property + def nameTuple(self): ... class TextNode(Element): element: Any diff --git a/stubs/beautifulsoup4/bs4/element.pyi b/stubs/beautifulsoup4/bs4/element.pyi index e55034475..7f6865b60 100644 --- a/stubs/beautifulsoup4/bs4/element.pyi +++ b/stubs/beautifulsoup4/bs4/element.pyi @@ -262,7 +262,8 @@ class Tag(PageElement): def __copy__(self: Self) -> Self: ... @property def is_empty_element(self) -> bool: ... - isSelfClosing = is_empty_element + @property + def isSelfClosing(self) -> bool: ... @property def string(self) -> str | None: ... @string.setter diff --git a/stubs/boto/boto/connection.pyi b/stubs/boto/boto/connection.pyi index fe2f136de..9e069c577 100644 --- a/stubs/boto/boto/connection.pyi +++ b/stubs/boto/boto/connection.pyi @@ -91,12 +91,14 @@ class AWSAuthConnection: def aws_access_key_id(self): ... @property def gs_access_key_id(self) -> Any: ... - access_key: Any + @property + def access_key(self): ... @property def aws_secret_access_key(self): ... @property def gs_secret_access_key(self): ... - secret_key: Any + @property + def secret_key(self): ... @property def profile_name(self): ... def get_path(self, path: str = ...): ... diff --git a/stubs/cryptography/cryptography/hazmat/primitives/asymmetric/dh.pyi b/stubs/cryptography/cryptography/hazmat/primitives/asymmetric/dh.pyi index 5ea447cb3..6b2b0ae51 100644 --- a/stubs/cryptography/cryptography/hazmat/primitives/asymmetric/dh.pyi +++ b/stubs/cryptography/cryptography/hazmat/primitives/asymmetric/dh.pyi @@ -30,7 +30,8 @@ class DHParameterNumbers: def parameters(self, backend: DHBackend | None = ...) -> DHParameters: ... class DHPrivateKey(metaclass=ABCMeta): - key_size: int + @property + def key_size(self) -> int: ... @abstractmethod def exchange(self, peer_public_key: DHPublicKey) -> bytes: ... @abstractmethod diff --git a/stubs/cryptography/cryptography/hazmat/primitives/asymmetric/utils.pyi b/stubs/cryptography/cryptography/hazmat/primitives/asymmetric/utils.pyi index 0ab7f47e1..4e5fedaf9 100644 --- a/stubs/cryptography/cryptography/hazmat/primitives/asymmetric/utils.pyi +++ b/stubs/cryptography/cryptography/hazmat/primitives/asymmetric/utils.pyi @@ -7,4 +7,5 @@ class Prehashed: _algorithm: HashAlgorithm # undocumented _digest_size: int # undocumented def __init__(self, algorithm: HashAlgorithm) -> None: ... - digest_size: int + @property + def digest_size(self) -> int: ... diff --git a/stubs/cryptography/cryptography/hazmat/primitives/hashes.pyi b/stubs/cryptography/cryptography/hazmat/primitives/hashes.pyi index 6e4828a48..ce4fc087b 100644 --- a/stubs/cryptography/cryptography/hazmat/primitives/hashes.pyi +++ b/stubs/cryptography/cryptography/hazmat/primitives/hashes.pyi @@ -2,12 +2,17 @@ from abc import ABCMeta, abstractmethod from cryptography.hazmat.backends.interfaces import HashBackend +# These are actually abstractproperties on HashAlgorithm, +# but let's not worry too much about that. class HashAlgorithm(metaclass=ABCMeta): - digest_size: int - name: str + @property + def digest_size(self) -> int: ... + @property + def name(self) -> str: ... class HashContext(metaclass=ABCMeta): - algorithm: HashAlgorithm + @property + def algorithm(self) -> HashAlgorithm: ... @abstractmethod def copy(self) -> HashContext: ... @abstractmethod diff --git a/stubs/cryptography/cryptography/x509/__init__.pyi b/stubs/cryptography/cryptography/x509/__init__.pyi index a2440aaa2..f821a5983 100644 --- a/stubs/cryptography/cryptography/x509/__init__.pyi +++ b/stubs/cryptography/cryptography/x509/__init__.pyi @@ -15,7 +15,8 @@ from cryptography.hazmat.primitives.hashes import HashAlgorithm from cryptography.hazmat.primitives.serialization import Encoding class ObjectIdentifier: - dotted_string: str + @property + def dotted_string(self) -> str: ... def __init__(self, dotted_string: str) -> None: ... class CRLEntryExtensionOID: @@ -108,7 +109,8 @@ class ExtendedKeyUsageOID: class NameAttribute: oid: ObjectIdentifier - value: str + @property + def value(self) -> str: ... def __init__(self, oid: ObjectIdentifier, value: str) -> None: ... def rfc4514_string(self) -> str: ... @@ -119,7 +121,8 @@ class RelativeDistinguishedName: def rfc4514_string(self) -> str: ... class Name: - rdns: list[RelativeDistinguishedName] + @property + def rdns(self) -> list[RelativeDistinguishedName]: ... def __init__(self, attributes: Sequence[NameAttribute | RelativeDistinguishedName]) -> None: ... def __iter__(self) -> Generator[NameAttribute, None, None]: ... def __len__(self) -> int: ... @@ -131,18 +134,31 @@ class Version(Enum): v1: int v3: int +# These are actually abstractproperties on Certificate, +# but let's not worry too much about that class Certificate(metaclass=ABCMeta): - extensions: Extensions - issuer: Name - not_valid_after: datetime.datetime - not_valid_before: datetime.datetime - serial_number: int - signature: bytes - signature_algorithm_oid: ObjectIdentifier - signature_hash_algorithm: HashAlgorithm - tbs_certificate_bytes: bytes - subject: Name - version: Version + @property + def extensions(self) -> Extensions: ... + @property + def issuer(self) -> Name: ... + @property + def not_valid_after(self) -> datetime.datetime: ... + @property + def not_valid_before(self) -> datetime.datetime: ... + @property + def serial_number(self) -> int: ... + @property + def signature(self) -> bytes: ... + @property + def signature_algorithm_oid(self) -> ObjectIdentifier: ... + @property + def signature_hash_algorithm(self) -> HashAlgorithm: ... + @property + def tbs_certificate_bytes(self) -> bytes: ... + @property + def subject(self) -> Name: ... + @property + def version(self) -> Version: ... @abstractmethod def fingerprint(self, algorithm: HashAlgorithm) -> bytes: ... @abstractmethod @@ -178,14 +194,22 @@ class CertificateBuilder: def subject_name(self, name: Name) -> CertificateBuilder: ... class CertificateRevocationList(metaclass=ABCMeta): - extensions: Extensions - issuer: Name - last_update: datetime.datetime - next_update: datetime.datetime - signature: bytes - signature_algorithm_oid: ObjectIdentifier - signature_hash_algorithm: HashAlgorithm - tbs_certlist_bytes: bytes + @property + def extensions(self) -> Extensions: ... + @property + def issuer(self) -> Name: ... + @property + def last_update(self) -> datetime.datetime: ... + @property + def next_update(self) -> datetime.datetime: ... + @property + def signature(self) -> bytes: ... + @property + def signature_algorithm_oid(self) -> ObjectIdentifier: ... + @property + def signature_hash_algorithm(self) -> HashAlgorithm: ... + @property + def tbs_certlist_bytes(self) -> bytes: ... @abstractmethod def fingerprint(self, algorithm: HashAlgorithm) -> bytes: ... @abstractmethod @@ -211,13 +235,20 @@ class CertificateRevocationListBuilder: ) -> CertificateRevocationList: ... class CertificateSigningRequest(metaclass=ABCMeta): - extensions: Extensions - is_signature_valid: bool - signature: bytes - signature_algorithm_oid: ObjectIdentifier - signature_hash_algorithm: HashAlgorithm - subject: Name - tbs_certrequest_bytes: bytes + @property + def extensions(self) -> Extensions: ... + @property + def is_signature_valid(self) -> bool: ... + @property + def signature(self) -> bytes: ... + @property + def signature_algorithm_oid(self) -> ObjectIdentifier: ... + @property + def signature_hash_algorithm(self) -> HashAlgorithm: ... + @property + def subject(self) -> Name: ... + @property + def tbs_certrequest_bytes(self) -> bytes: ... @abstractmethod def public_bytes(self, encoding: Encoding) -> bytes: ... @abstractmethod @@ -234,9 +265,12 @@ class CertificateSigningRequestBuilder: ) -> CertificateSigningRequest: ... class RevokedCertificate(metaclass=ABCMeta): - extensions: Extensions - revocation_date: datetime.datetime - serial_number: int + @property + def extensions(self) -> Extensions: ... + @property + def revocation_date(self) -> datetime.datetime: ... + @property + def serial_number(self) -> int: ... class RevokedCertificateBuilder: def add_extension(self, extension: ExtensionType, critical: bool) -> RevokedCertificateBuilder: ... @@ -247,35 +281,44 @@ class RevokedCertificateBuilder: # General Name Classes class GeneralName(metaclass=ABCMeta): - value: Any + @property + def value(self): ... class DirectoryName(GeneralName): - value: Name + @property + def value(self) -> Name: ... def __init__(self, value: Name) -> None: ... class DNSName(GeneralName): - value: str + @property + def value(self) -> str: ... def __init__(self, value: str) -> None: ... class IPAddress(GeneralName): - value: IPv4Address | IPv6Address | IPv4Network | IPv6Network + @property + def value(self) -> IPv4Address | IPv6Address | IPv4Network | IPv6Network: ... def __init__(self, value: IPv4Address | IPv6Address | IPv4Network | IPv6Network) -> None: ... class OtherName(GeneralName): - type_id: ObjectIdentifier - value: bytes + @property + def type_id(self) -> ObjectIdentifier: ... + @property + def value(self) -> bytes: ... def __init__(self, type_id: ObjectIdentifier, value: bytes) -> None: ... class RegisteredID(GeneralName): - value: ObjectIdentifier + @property + def value(self) -> ObjectIdentifier: ... def __init__(self, value: ObjectIdentifier) -> None: ... class RFC822Name(GeneralName): - value: str + @property + def value(self) -> str: ... def __init__(self, value: str) -> None: ... class UniformResourceIdentifier(GeneralName): - value: str + @property + def value(self) -> str: ... def __init__(self, value: str) -> None: ... # X.509 Extensions @@ -286,9 +329,11 @@ class ExtensionType(metaclass=ABCMeta): _T = TypeVar("_T", bound=ExtensionType) class Extension(Generic[_T]): - critical: bool + @property + def critical(self) -> bool: ... oid: ObjectIdentifier - value: _T + @property + def value(self) -> _T: ... class Extensions: def __init__(self, general_names: list[Extension[Any]]) -> None: ... diff --git a/stubs/cryptography/cryptography/x509/extensions.pyi b/stubs/cryptography/cryptography/x509/extensions.pyi index a9b2ad08b..207f3bb61 100644 --- a/stubs/cryptography/cryptography/x509/extensions.pyi +++ b/stubs/cryptography/cryptography/x509/extensions.pyi @@ -1,22 +1,26 @@ -from typing import Any, Iterator +from collections.abc import Iterator from cryptography.x509 import GeneralName, ObjectIdentifier class Extension: - value: Any = ... + @property + def value(self): ... class GeneralNames: def __iter__(self) -> Iterator[GeneralName]: ... class DistributionPoint: - full_name: GeneralNames = ... + @property + def full_name(self) -> GeneralNames: ... class CRLDistributionPoints: def __iter__(self) -> Iterator[DistributionPoint]: ... class AccessDescription: - access_method: ObjectIdentifier = ... - access_location: GeneralName = ... + @property + def access_method(self) -> ObjectIdentifier: ... + @property + def access_location(self) -> GeneralName: ... class AuthorityInformationAccess: def __iter__(self) -> Iterator[AccessDescription]: ... diff --git a/stubs/html5lib/html5lib/_inputstream.pyi b/stubs/html5lib/html5lib/_inputstream.pyi index ad08d3587..56096a058 100644 --- a/stubs/html5lib/html5lib/_inputstream.pyi +++ b/stubs/html5lib/html5lib/_inputstream.pyi @@ -82,7 +82,8 @@ class EncodingBytes(bytes): def getPosition(self): ... position: Any def getCurrentByte(self): ... - currentByte: Any + @property + def currentByte(self): ... def skip(self, chars=...): ... def skipUntil(self, chars): ... def matchBytes(self, bytes): ... diff --git a/stubs/html5lib/html5lib/treebuilders/etree_lxml.pyi b/stubs/html5lib/html5lib/treebuilders/etree_lxml.pyi index 1016b9091..9a16c4934 100644 --- a/stubs/html5lib/html5lib/treebuilders/etree_lxml.pyi +++ b/stubs/html5lib/html5lib/treebuilders/etree_lxml.pyi @@ -15,7 +15,8 @@ class DocumentType: class Document: def __init__(self) -> None: ... def appendChild(self, element) -> None: ... - childNodes: Any + @property + def childNodes(self): ... def testSerializer(element): ... def tostring(element): ... diff --git a/stubs/openpyxl/openpyxl/cell/cell.pyi b/stubs/openpyxl/openpyxl/cell/cell.pyi index e5e137810..b8a89507b 100644 --- a/stubs/openpyxl/openpyxl/cell/cell.pyi +++ b/stubs/openpyxl/openpyxl/cell/cell.pyi @@ -66,7 +66,8 @@ class MergedCell(StyleableObject): row: Any column: Any def __init__(self, worksheet, row: Any | None = ..., column: Any | None = ...) -> None: ... - coordinate: Any + @property + def coordinate(self): ... value: Any def WriteOnlyCell(ws: Any | None = ..., value: Any | None = ...): ... diff --git a/stubs/openpyxl/openpyxl/worksheet/_read_only.pyi b/stubs/openpyxl/openpyxl/worksheet/_read_only.pyi index 1d3efedb9..256a4bc1e 100644 --- a/stubs/openpyxl/openpyxl/worksheet/_read_only.pyi +++ b/stubs/openpyxl/openpyxl/worksheet/_read_only.pyi @@ -5,8 +5,10 @@ def read_dimension(source): ... class ReadOnlyWorksheet: cell: Any iter_rows: Any - values: Any - rows: Any + @property + def values(self): ... + @property + def rows(self): ... __getitem__: Any __iter__: Any parent: Any diff --git a/stubs/openpyxl/openpyxl/worksheet/_write_only.pyi b/stubs/openpyxl/openpyxl/worksheet/_write_only.pyi index 1107f015b..c89ed90e5 100644 --- a/stubs/openpyxl/openpyxl/worksheet/_write_only.pyi +++ b/stubs/openpyxl/openpyxl/worksheet/_write_only.pyi @@ -7,13 +7,16 @@ class WriteOnlyWorksheet(_WorkbookChild): add_chart: Any add_image: Any add_table: Any - tables: Any - print_titles: Any + @property + def tables(self): ... + @property + def print_titles(self): ... print_title_cols: Any print_title_rows: Any freeze_panes: Any print_area: Any - sheet_view: Any + @property + def sheet_view(self): ... def __init__(self, parent, title) -> None: ... @property def closed(self): ... diff --git a/stubs/openpyxl/openpyxl/worksheet/merge.pyi b/stubs/openpyxl/openpyxl/worksheet/merge.pyi index b52975cca..ed70a5e75 100644 --- a/stubs/openpyxl/openpyxl/worksheet/merge.pyi +++ b/stubs/openpyxl/openpyxl/worksheet/merge.pyi @@ -6,7 +6,8 @@ from .cell_range import CellRange class MergeCell(CellRange): tagname: str - ref: Any + @property + def ref(self): ... __attrs__: Any def __init__(self, ref: Any | None = ...) -> None: ... def __copy__(self): ... diff --git a/stubs/openpyxl/openpyxl/worksheet/pagebreak.pyi b/stubs/openpyxl/openpyxl/worksheet/pagebreak.pyi index 067230c11..4fdcaa279 100644 --- a/stubs/openpyxl/openpyxl/worksheet/pagebreak.pyi +++ b/stubs/openpyxl/openpyxl/worksheet/pagebreak.pyi @@ -32,7 +32,9 @@ PageBreak = RowBreak class ColBreak(RowBreak): tagname: str - count: Any - manualBreakCount: Any + @property + def count(self): ... + @property + def manualBreakCount(self): ... brk: Any __attrs__: Any diff --git a/stubs/passlib/passlib/utils/handlers.pyi b/stubs/passlib/passlib/utils/handlers.pyi index 441e4198b..8314b2b28 100644 --- a/stubs/passlib/passlib/utils/handlers.pyi +++ b/stubs/passlib/passlib/utils/handlers.pyi @@ -152,7 +152,8 @@ class PrefixWrapper: def __init__( self, name, wrapped, prefix=..., orig_prefix=..., lazy: bool = ..., doc: Any | None = ..., ident: Any | None = ... ) -> None: ... - wrapped: Any + @property + def wrapped(self): ... @property def ident(self): ... @property diff --git a/stubs/setuptools/pkg_resources/__init__.pyi b/stubs/setuptools/pkg_resources/__init__.pyi index a9c7f01a4..61ed6e90d 100644 --- a/stubs/setuptools/pkg_resources/__init__.pyi +++ b/stubs/setuptools/pkg_resources/__init__.pyi @@ -121,10 +121,14 @@ class Distribution(IResourceProvider, IMetadataProvider): PKG_INFO: str location: str project_name: str - key: str - extras: list[str] - version: str - parsed_version: tuple[str, ...] + @property + def key(self) -> str: ... + @property + def extras(self) -> list[str]: ... + @property + def version(self) -> str: ... + @property + def parsed_version(self) -> tuple[str, ...]: ... py_version: str platform: str | None precedence: int diff --git a/stubs/setuptools/setuptools/command/egg_info.pyi b/stubs/setuptools/setuptools/command/egg_info.pyi index 3be97afb4..a1feeb5c1 100644 --- a/stubs/setuptools/setuptools/command/egg_info.pyi +++ b/stubs/setuptools/setuptools/command/egg_info.pyi @@ -13,7 +13,8 @@ class InfoCommon: def name(self): ... def tagged_version(self): ... def tags(self): ... - vtags: Any + @property + def vtags(self): ... class egg_info(InfoCommon, Command): description: str