Skip to content

Commit f651d52

Browse files
committed
pytest_plugin(fix): Move pathlib import outside TYPE_CHECKING block
why: Make pathlib available at documentation build time for type hints what: - Move pathlib import from TYPE_CHECKING block to regular imports - Fixes forward reference resolution in sphinx-autodoc-typehints
1 parent e2a91de commit f651d52

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/libtmux/pytest_plugin.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import getpass
88
import logging
99
import os
10+
import pathlib
1011
import typing as t
1112

1213
import pytest
@@ -17,8 +18,6 @@
1718
from libtmux.test.random import get_test_session_name, namer
1819

1920
if t.TYPE_CHECKING:
20-
import pathlib
21-
2221
from libtmux.session import Session
2322

2423
logger = logging.getLogger(__name__)

0 commit comments

Comments
 (0)