Skip to content

Commit 170c2c0

Browse files
committed
Merge branch 'main' of https://github.com/pypa/setuptools into re-enable-mypy
2 parents 973f66a + 94ee160 commit 170c2c0

File tree

3 files changed

+47
-23
lines changed

3 files changed

+47
-23
lines changed

docs/conf.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
extensions = [
24
'sphinx.ext.autodoc',
35
'jaraco.packaging.sphinx',
@@ -93,6 +95,7 @@
9395

9496
# Be strict about any broken references
9597
nitpicky = True
98+
nitpick_ignore: list[tuple[str, str]] = []
9699

97100
# Include Python intersphinx mapping to prevent failures
98101
# jaraco/skeleton#51
@@ -104,32 +107,17 @@
104107
# Preserve authored syntax for defaults
105108
autodoc_preserve_defaults = True
106109

107-
intersphinx_mapping.update({
108-
'pip': ('https://pip.pypa.io/en/latest', None),
109-
'build': ('https://build.pypa.io/en/latest', None),
110-
'PyPUG': ('https://packaging.python.org/en/latest/', None),
111-
'packaging': ('https://packaging.pypa.io/en/latest/', None),
112-
'twine': ('https://twine.readthedocs.io/en/stable/', None),
113-
'importlib-resources': (
114-
'https://importlib-resources.readthedocs.io/en/latest',
115-
None,
116-
),
117-
})
118-
119-
# Add support for linking usernames
120-
github_url = 'https://github.com'
121-
github_repo_org = 'pypa'
122-
github_repo_name = 'setuptools'
123-
github_repo_slug = f'{github_repo_org}/{github_repo_name}'
124-
github_repo_url = f'{github_url}/{github_repo_slug}'
125-
github_sponsors_url = f'{github_url}/sponsors'
110+
# Add support for linking usernames, PyPI projects, Wikipedia pages
111+
github_url = 'https://github.com/'
126112
extlinks = {
127-
'user': (f'{github_sponsors_url}/%s', '@%s'),
113+
'user': (f'{github_url}%s', '@%s'),
128114
'pypi': ('https://pypi.org/project/%s', '%s'),
129115
'wiki': ('https://wikipedia.org/wiki/%s', '%s'),
130116
}
131117
extensions += ['sphinx.ext.extlinks']
132118

119+
# local
120+
133121
# Ref: https://github.com/python-attrs/attrs/pull/571/files\
134122
# #diff-85987f48f1258d9ee486e3191495582dR82
135123
default_role = 'any'
@@ -163,7 +151,7 @@
163151
# Support for distutils
164152

165153
# Ref: https://stackoverflow.com/a/30624034/595220
166-
nitpick_ignore = [
154+
nitpick_ignore += [
167155
('c:func', 'SHGetSpecialFolderPath'), # ref to MS docs
168156
('envvar', 'DIST_EXTRA_CONFIG'), # undocumented
169157
('envvar', 'DISTUTILS_DEBUG'), # undocumented
@@ -245,3 +233,15 @@
245233
},
246234
# rel="apple-touch-icon" does not support SVG yet
247235
]
236+
237+
intersphinx_mapping.update({
238+
'pip': ('https://pip.pypa.io/en/latest', None),
239+
'build': ('https://build.pypa.io/en/latest', None),
240+
'PyPUG': ('https://packaging.python.org/en/latest/', None),
241+
'packaging': ('https://packaging.pypa.io/en/latest/', None),
242+
'twine': ('https://twine.readthedocs.io/en/stable/', None),
243+
'importlib-resources': (
244+
'https://importlib-resources.readthedocs.io/en/latest',
245+
None,
246+
),
247+
})

docs/development/developer-guide.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,29 @@ To refresh the dependencies, run the following command::
132132

133133
$ tox -e vendor
134134

135+
136+
------------------------------------
137+
Code conventions and other practices
138+
------------------------------------
139+
140+
Setuptools utilizes the `skeleton <https://github.com/jaraco/skeleton>`_
141+
framework as a foundation for sharing re-usable maintenance tasks
142+
across different projects in the ecosystem.
143+
144+
This also means that the project adheres to the same coding conventions
145+
and other practices described in the `skeleton documentation
146+
<https://blog.jaraco.com/skeleton/>`_.
147+
148+
Moreover, changes in the code base should be kept as compatible as possible
149+
to ``skeleton`` to avoid merge conflicts, or accidental regressions on
150+
periodical merges.
151+
152+
Finally, the ``setuptools/_distutils`` directory should not be modified
153+
directly when contributing to the ``setuptools`` project.
154+
Instead, this directory is maintained as a separated project in
155+
https://github.com/pypa/distutils, and periodically merged into ``setuptools``.
156+
157+
135158
----------------
136159
Type annotations
137160
----------------

mypy.ini

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ enable_error_code = ignore-without-code
1212
# Support namespace packages per https://github.com/python/mypy/issues/14057
1313
explicit_package_bases = True
1414

15-
# Disable overload-overlap due to many false-positives
16-
disable_error_code = overload-overlap
15+
disable_error_code =
16+
# Disable due to many false positives
17+
overload-overlap,
1718

1819
## local
1920

0 commit comments

Comments
 (0)