Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/pypa/setuptools into re-ena…
Browse files Browse the repository at this point in the history
…ble-mypy
  • Loading branch information
Avasam committed Aug 29, 2024
2 parents 973f66a + 94ee160 commit 170c2c0
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 23 deletions.
42 changes: 21 additions & 21 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

extensions = [
'sphinx.ext.autodoc',
'jaraco.packaging.sphinx',
Expand Down Expand Up @@ -93,6 +95,7 @@

# Be strict about any broken references
nitpicky = True
nitpick_ignore: list[tuple[str, str]] = []

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

intersphinx_mapping.update({
'pip': ('https://pip.pypa.io/en/latest', None),
'build': ('https://build.pypa.io/en/latest', None),
'PyPUG': ('https://packaging.python.org/en/latest/', None),
'packaging': ('https://packaging.pypa.io/en/latest/', None),
'twine': ('https://twine.readthedocs.io/en/stable/', None),
'importlib-resources': (
'https://importlib-resources.readthedocs.io/en/latest',
None,
),
})

# Add support for linking usernames
github_url = 'https://github.com'
github_repo_org = 'pypa'
github_repo_name = 'setuptools'
github_repo_slug = f'{github_repo_org}/{github_repo_name}'
github_repo_url = f'{github_url}/{github_repo_slug}'
github_sponsors_url = f'{github_url}/sponsors'
# Add support for linking usernames, PyPI projects, Wikipedia pages
github_url = 'https://github.com/'
extlinks = {
'user': (f'{github_sponsors_url}/%s', '@%s'),
'user': (f'{github_url}%s', '@%s'),
'pypi': ('https://pypi.org/project/%s', '%s'),
'wiki': ('https://wikipedia.org/wiki/%s', '%s'),
}
extensions += ['sphinx.ext.extlinks']

# local

# Ref: https://github.com/python-attrs/attrs/pull/571/files\
# #diff-85987f48f1258d9ee486e3191495582dR82
default_role = 'any'
Expand Down Expand Up @@ -163,7 +151,7 @@
# Support for distutils

# Ref: https://stackoverflow.com/a/30624034/595220
nitpick_ignore = [
nitpick_ignore += [
('c:func', 'SHGetSpecialFolderPath'), # ref to MS docs
('envvar', 'DIST_EXTRA_CONFIG'), # undocumented
('envvar', 'DISTUTILS_DEBUG'), # undocumented
Expand Down Expand Up @@ -245,3 +233,15 @@
},
# rel="apple-touch-icon" does not support SVG yet
]

intersphinx_mapping.update({
'pip': ('https://pip.pypa.io/en/latest', None),
'build': ('https://build.pypa.io/en/latest', None),
'PyPUG': ('https://packaging.python.org/en/latest/', None),
'packaging': ('https://packaging.pypa.io/en/latest/', None),
'twine': ('https://twine.readthedocs.io/en/stable/', None),
'importlib-resources': (
'https://importlib-resources.readthedocs.io/en/latest',
None,
),
})
23 changes: 23 additions & 0 deletions docs/development/developer-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,29 @@ To refresh the dependencies, run the following command::

$ tox -e vendor


------------------------------------
Code conventions and other practices
------------------------------------

Setuptools utilizes the `skeleton <https://github.com/jaraco/skeleton>`_
framework as a foundation for sharing re-usable maintenance tasks
across different projects in the ecosystem.

This also means that the project adheres to the same coding conventions
and other practices described in the `skeleton documentation
<https://blog.jaraco.com/skeleton/>`_.

Moreover, changes in the code base should be kept as compatible as possible
to ``skeleton`` to avoid merge conflicts, or accidental regressions on
periodical merges.

Finally, the ``setuptools/_distutils`` directory should not be modified
directly when contributing to the ``setuptools`` project.
Instead, this directory is maintained as a separated project in
https://github.com/pypa/distutils, and periodically merged into ``setuptools``.


----------------
Type annotations
----------------
Expand Down
5 changes: 3 additions & 2 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ enable_error_code = ignore-without-code
# Support namespace packages per https://github.com/python/mypy/issues/14057
explicit_package_bases = True

# Disable overload-overlap due to many false-positives
disable_error_code = overload-overlap
disable_error_code =
# Disable due to many false positives
overload-overlap,

## local

Expand Down

0 comments on commit 170c2c0

Please sign in to comment.