Skip to content

Commit 3e8bbf2

Browse files
committed
fix mypy
1 parent 144c168 commit 3e8bbf2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

codeflash/tracing/tracing_utils.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from dataclasses import dataclass
55
from functools import cache
66
from pathlib import Path
7-
from typing import Optional
7+
from typing import Optional, cast
88

99
import git
1010

@@ -34,10 +34,11 @@ def is_git_repo(file_path: str) -> bool:
3434

3535

3636
@cache
37-
def ignored_submodule_paths(module_root: str) -> list[str]:
37+
def ignored_submodule_paths(module_root: str) -> list[Path]:
3838
if is_git_repo(module_root):
3939
git_repo = git.Repo(module_root, search_parent_directories=True)
40-
return [Path(git_repo.working_tree_dir, submodule.path).resolve() for submodule in git_repo.submodules]
40+
working_tree_dir = cast("Path", git_repo.working_tree_dir)
41+
return [Path(working_tree_dir, submodule.path).resolve() for submodule in git_repo.submodules]
4142
return []
4243

4344

0 commit comments

Comments
 (0)