Skip to content

Commit 1c2defd

Browse files
committed
Work around flit error with annotated assignments
1 parent 4d88472 commit 1c2defd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sphinx/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77

88
import warnings
99

10-
from sphinx.util._pathlib import _StrPath
10+
# work around flit error in parsing annotated assignments
11+
try:
12+
from sphinx.util._pathlib import _StrPath
13+
except ImportError:
14+
from pathlib import Path as _StrPath
1115

1216
TYPE_CHECKING = False
1317
if TYPE_CHECKING:

0 commit comments

Comments
 (0)