Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3a82796

Browse files
authored
[distutils] Add generated methods to Distribution (#9896)
1 parent bcff9cd commit 3a82796

4 files changed

Lines changed: 53 additions & 0 deletions

File tree

stdlib/distutils/dist.pyi

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,26 @@ class Distribution:
114114
def has_scripts(self): ...
115115
def has_data_files(self): ...
116116
def is_pure(self): ...
117+
118+
# Autogenerated getters
119+
def get_name(self) -> str: ...
120+
def get_version(self) -> str: ...
121+
def get_fullname(self) -> str: ...
122+
def get_author(self) -> str: ...
123+
def get_author_email(self) -> str: ...
124+
def get_maintainer(self) -> str: ...
125+
def get_maintainer_email(self) -> str: ...
126+
def get_contact(self) -> str: ...
127+
def get_contact_email(self) -> str: ...
128+
def get_url(self) -> str: ...
129+
def get_license(self) -> str: ...
130+
def get_licence(self) -> str: ...
131+
def get_description(self) -> str: ...
132+
def get_long_description(self) -> str: ...
133+
def get_keywords(self) -> str | list[str]: ...
134+
def get_platforms(self) -> str | list[str]: ...
135+
def get_classifiers(self) -> str | list[str]: ...
136+
def get_download_url(self) -> str: ...
137+
def get_requires(self) -> list[str]: ...
138+
def get_provides(self) -> list[str]: ...
139+
def get_obsoletes(self) -> list[str]: ...

stubs/setuptools/@tests/stubtest_allowlist.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ pkg_resources.to_filename
2727
pkg_resources.PathMetadata.egg_info
2828
pkg_resources.EggMetadata.loader
2929

30+
# Dynamically created
31+
setuptools._distutils.dist.Distribution.get_.*
32+
3033
# Uncomment once ignore_missing_stub is turned off
3134
# # Not supported by typeshed
3235
# setuptools.py34compat

stubs/setuptools/setuptools/_distutils/dist.pyi

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,26 @@ class Distribution:
5858
def get_option_dict(self, command: str) -> dict[str, tuple[str, str]]: ...
5959
def parse_config_files(self, filenames: Iterable[str] | None = ...) -> None: ...
6060
def get_command_obj(self, command: str, create: bool = ...) -> Command | None: ...
61+
62+
# Autogenerated getters
63+
def get_name(self) -> str: ...
64+
def get_version(self) -> str: ...
65+
def get_fullname(self) -> str: ...
66+
def get_author(self) -> str: ...
67+
def get_author_email(self) -> str: ...
68+
def get_maintainer(self) -> str: ...
69+
def get_maintainer_email(self) -> str: ...
70+
def get_contact(self) -> str: ...
71+
def get_contact_email(self) -> str: ...
72+
def get_url(self) -> str: ...
73+
def get_license(self) -> str: ...
74+
def get_licence(self) -> str: ...
75+
def get_description(self) -> str: ...
76+
def get_long_description(self) -> str: ...
77+
def get_keywords(self) -> str | list[str]: ...
78+
def get_platforms(self) -> str | list[str]: ...
79+
def get_classifiers(self) -> str | list[str]: ...
80+
def get_download_url(self) -> str: ...
81+
def get_requires(self) -> list[str]: ...
82+
def get_provides(self) -> list[str]: ...
83+
def get_obsoletes(self) -> list[str]: ...

tests/stubtest_allowlists/py3_common.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,10 @@ xml.dom
520520
xml.etree
521521
xml.sax
522522

523+
# Dynamically created
524+
distutils.dist.Distribution.get_.*
525+
distutils.core.Distribution.get_.*
526+
523527
# Platform differences that cannot be captured by the type system
524528
os.O_[A-Z_]+
525529
socket.AF_DECnet

0 commit comments

Comments
 (0)