diff --git a/docs/conf.py b/docs/conf.py index 515ad2a..a7ce351 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,3 +1,6 @@ +from __future__ import annotations + + extensions = [ 'sphinx.ext.autodoc', 'jaraco.packaging.sphinx', @@ -30,7 +33,7 @@ # Be strict about any broken references nitpicky = True -nitpick_ignore = [] +nitpick_ignore: list[tuple[str, str]] = [] # Include Python intersphinx mapping to prevent failures # jaraco/skeleton#51 @@ -42,11 +45,26 @@ # Preserve authored syntax for defaults autodoc_preserve_defaults = True -nitpick_ignore.append(('py:class', 'jaraco.nxt.BluetoothSocket')) +# Add support for linking usernames, PyPI projects, Wikipedia pages +github_url = 'https://github.com/' +extlinks = { + '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 + +nitpick_ignore += [ + ('py:class', 'jaraco.nxt.BluetoothSocket'), +] # until pyserial docs built on Sphinx 5 # ref https://github.com/sphinx-doc/sphinx/issues/10198 # intersphinx_mapping.update( # pyserial='https://pyserial.readthedocs.io/en/latest/', # ) -nitpick_ignore.append(('py:class', 'serial.serialposix.Serial')) +nitpick_ignore += [ + ('py:class', 'serial.serialposix.Serial'), +] diff --git a/mypy.ini b/mypy.ini index 83b0d15..efcb8cb 100644 --- a/mypy.ini +++ b/mypy.ini @@ -10,5 +10,6 @@ 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,