File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 44from dataclasses import dataclass
55from functools import cache
66from pathlib import Path
7- from typing import Optional
7+ from typing import Optional , cast
88
99import 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
You can’t perform that action at this time.
0 commit comments