Skip to content

Commit de998fd

Browse files
Fix type errors
1 parent 12d9935 commit de998fd

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

client/configuration/search_path.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
LOG: logging.Logger = logging.getLogger(__name__)
2929

3030
dist_info_in_root: Dict[str, List[str]] = {}
31-
_site_filter = re.compile(r".*-([0-99]\.)*dist-info")
31+
_site_filter: re.Pattern[str] = re.compile(r".*-([0-99]\.)*dist-info")
3232

33-
_PYCACHE = re.compile("__pycache__")
33+
_PYCACHE: re.Pattern[str] = re.compile("__pycache__")
3434

3535

3636
def _expand_relative_root(path: str, relative_root: str) -> str:
@@ -99,7 +99,10 @@ def package_path(self) -> Union[str, None]:
9999
else:
100100
return None
101101

102-
not_toplevel_patterns: Tuple[re.Pattern] = (this_pkg_filter, _PYCACHE)
102+
not_toplevel_patterns: Tuple[re.Pattern[str], re.Pattern[str]] = (
103+
this_pkg_filter,
104+
_PYCACHE,
105+
)
103106

104107
with open(file=f"{dist_info_path}/RECORD", mode="r") as record:
105108
files = []

client/configuration/tests/search_path_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ def test_process_required_raw_elements_site_package_nonexistence(self) -> None:
250250
required=True,
251251
)
252252

253-
def test_toplevel_module_not_pyfile(self):
253+
def test_toplevel_module_not_pyfile(self) -> None:
254254
Path.mkdir(Path("foo"), exist_ok=True)
255255
Path.mkdir(Path("foo/bar-1.0.0.dist-info"), exist_ok=True)
256256
Path.touch(Path("foo/bar.so"), exist_ok=True)

0 commit comments

Comments
 (0)