Skip to content

Commit 58e67a6

Browse files
committed
Update Sphinx
1 parent 928a290 commit 58e67a6

File tree

4 files changed

+19
-21
lines changed

4 files changed

+19
-21
lines changed

docs/conf.py

+8-10
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,10 @@
127127

128128
# ignore the following undocumented or internal references:
129129
ignore_references = set('''
130-
GNT GT T
130+
GNT GT KT T VT
131131
enum.Enum
132132
traceback
133+
types.TracebackType
133134
asyncio.events.AbstractEventLoop
134135
graphql.subscription.map_async_iterator.MapAsyncIterator
135136
graphql.type.schema.InterfaceImplementations
@@ -151,20 +152,17 @@ def on_missing_reference(app, env, node, contnode):
151152
if target in ignore_references:
152153
return contnode
153154
typ = node.get('reftype')
155+
name = target.rsplit('.', 1)[-1]
156+
if name in ('GT', 'GNT', 'KT', 'T', 'VT'):
157+
return contnode
154158
if typ == 'obj':
155-
# workaround for https://github.com/sphinx-doc/sphinx/issues/8818
156-
if target in ('Any', 'Optional', 'Union'):
157-
return contnode
158-
base_module, target = target.split('.', 1)
159-
name = target.rsplit('.', 1)[-1]
160-
if name in ('T', 'GT', 'GNT', 'KT', 'VT'):
161-
return contnode
159+
if target.startswith('typing.'):
160+
if name in ('Any', 'Optional', 'Union'):
161+
return contnode
162162
if typ != 'class':
163163
return None
164164
if '.' in target: # maybe too specific
165165
base_module, target = target.split('.', 1)
166-
if base_module == 'typing':
167-
return contnode
168166
if base_module == 'graphql':
169167
if '.' not in target:
170168
return None

poetry.lock

+9-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ black = [
5656
flake8 = "^3.9"
5757
mypy = "0.910"
5858
codecov = "^2"
59-
sphinx = "^3.5"
59+
sphinx = "^4.1"
6060
sphinx_rtd_theme = ">=0.5,<1"
6161
check-manifest = ">=0.46,<1"
6262
bump2version = ">=1.0,<2"

tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ commands =
2525
[testenv:docs]
2626
basepython = python3.9
2727
deps =
28-
sphinx>=3.5,<4
28+
sphinx>=4.1,<5
2929
sphinx_rtd_theme>=0.5,<1
3030
commands =
3131
sphinx-build -b html -nEW docs docs/_build/html

0 commit comments

Comments
 (0)