Skip to content

Commit 3e06bd8

Browse files
committed
Work around Sphinx issue with Python 3.10 and UnionType
1 parent bd7176d commit 3e06bd8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/conftest.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
# stdlib
22
import pathlib
3+
import sys
34

45
# 3rd party
56
import pytest
67
from sphinx.testing.path import path
78

9+
if sys.version_info >= (3, 10):
10+
# stdlib
11+
import types
12+
types.Union = types.UnionType
13+
814
pytest_plugins = ("sphinx.testing.fixtures", "coincidence")
915

1016

0 commit comments

Comments
 (0)