Skip to content

Commit 7b0e1ae

Browse files
committed
fix(submodule): coerce deinit path to str for mypy
self.path is str | PathLike[str], but the deinit args list is typed List[str], so mypy flagged the list item as incompatible (base.py:1297). Wrap it in str() - this is the CI failure that put the PR back to draft. git submodule expects a string path anyway, and the existing test (path="module") is unaffected.
1 parent 8e24b0f commit 7b0e1ae

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

git/objects/submodule/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1294,7 +1294,7 @@ def deinit(self, force: bool = False) -> "Submodule":
12941294
args: List[str] = []
12951295
if force:
12961296
args.append("--force")
1297-
args.extend(["--", self.path])
1297+
args.extend(["--", str(self.path)])
12981298
self.repo.git.submodule("deinit", *args)
12991299
return self
13001300

0 commit comments

Comments
 (0)