Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
# Conflicts:
#	docs/conf.py
#	mypy.ini
  • Loading branch information
jaraco committed Aug 29, 2024
2 parents 99a4927 + 790fa6e commit 94ee160
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 23 deletions.
43 changes: 22 additions & 21 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
from __future__ import annotations


extensions = [
'sphinx.ext.autodoc',
'jaraco.packaging.sphinx',
Expand Down Expand Up @@ -93,6 +96,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 +108,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 +152,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 +234,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,
),
})
7 changes: 5 additions & 2 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ warn_unused_ignores = True
warn_redundant_casts = True
# required to support namespace packages: https://github.com/python/mypy/issues/14057
explicit_package_bases = True

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

exclude = (?x)(
# Avoid scanning Python files in generated folders
^build/
Expand All @@ -19,8 +24,6 @@ exclude = (?x)(
# Duplicate module name
| ^pkg_resources/tests/data/my-test-package-source/setup.py$
)
# Too many false-positives
disable_error_code = overload-overlap

# DistributionMetadata.license_files and DistributionMetadata.license_file
# are dynamically patched in setuptools/_core_metadata.py
Expand Down

0 comments on commit 94ee160

Please sign in to comment.