File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919GitConfigValue : t .TypeAlias = bool | int | float | StrPath
2020
2121
22+ class GitSubmoduleData (t .TypedDict ):
23+ """Structured submodule data returned by _ls()."""
24+
25+ name : str
26+ path : str
27+ sha : str
28+ url : str | None
29+ branch : str | None
30+ status_prefix : str
31+ description : str
32+
33+
2234class Git :
2335 """Run commands directly on a git repository."""
2436
@@ -3387,7 +3399,7 @@ def _ls(
33873399 # Pass-through to run()
33883400 log_in_real_time : bool = False ,
33893401 check_returncode : bool | None = None ,
3390- ) -> list [dict [ str , t . Any ] ]:
3402+ ) -> list [GitSubmoduleData ]:
33913403 """Parse submodule status output into structured data.
33923404
33933405 Parameters
@@ -3399,7 +3411,7 @@ def _ls(
33993411
34003412 Returns
34013413 -------
3402- list[dict[str, Any] ]
3414+ list[GitSubmoduleData ]
34033415 List of parsed submodule data.
34043416
34053417 Examples
@@ -3422,7 +3434,7 @@ def _ls(
34223434 log_in_real_time = log_in_real_time ,
34233435 )
34243436
3425- submodules : list [dict [ str , t . Any ] ] = []
3437+ submodules : list [GitSubmoduleData ] = []
34263438
34273439 for line in result .strip ().split ("\n " ):
34283440 if not line :
You can’t perform that action at this time.
0 commit comments