File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55import fnmatch
66import pathlib
7+ import typing as t
78
89from vcspull .config import canonicalize_workspace_path , workspace_root_label
9- from vcspull .types import ConfigDict
10+
11+ if t .TYPE_CHECKING :
12+ from vcspull .types import ConfigDict
1013
1114
1215def _normalize_workspace_label (
Original file line number Diff line number Diff line change 2424
2525from vcspull import exc
2626from vcspull .config import filter_repos , find_config_files , load_configs
27- from vcspull .types import ConfigDict
2827from vcspull .util import contract_user_home
2928
3029from ._colors import Colors , get_color_mode
4847 from libvcs ._internal .types import VCSLiteral
4948 from libvcs .sync .git import GitSync
5049
50+ from vcspull .types import ConfigDict
51+
5152log = logging .getLogger (__name__ )
5253
5354ProgressCallback = Callable [[str , datetime ], None ]
Original file line number Diff line number Diff line change @@ -287,13 +287,10 @@ def load_configs(
287287 return repos
288288
289289
290- ConfigDictTuple = tuple ["ConfigDict" , "ConfigDict" ]
291-
292-
293290def detect_duplicate_repos (
294291 config1 : list [ConfigDict ],
295292 config2 : list [ConfigDict ],
296- ) -> list [ConfigDictTuple ]:
293+ ) -> list [tuple [ ConfigDict , ConfigDict ] ]:
297294 """Return duplicate repos dict if repo_dir same and vcs different.
298295
299296 Parameters
@@ -304,13 +301,13 @@ def detect_duplicate_repos(
304301
305302 Returns
306303 -------
307- list[ConfigDictTuple ]
304+ list[tuple[ConfigDict, ConfigDict] ]
308305 List of duplicate tuples
309306 """
310307 if not config1 :
311308 return []
312309
313- dupes : list [ConfigDictTuple ] = []
310+ dupes : list [tuple [ ConfigDict , ConfigDict ] ] = []
314311
315312 repo_dirs = {
316313 pathlib .Path (repo ["path" ]).parent / repo ["name" ]: repo for repo in config1
Original file line number Diff line number Diff line change 1616 check_repo_status ,
1717 status_repos ,
1818)
19+ from vcspull .types import ConfigDict
1920
2021if t .TYPE_CHECKING :
2122 from _pytest .monkeypatch import MonkeyPatch
@@ -561,8 +562,6 @@ async def test_check_repos_status_async_basic(
561562 tmp_path : pathlib .Path ,
562563) -> None :
563564 """Test basic async concurrent status checking."""
564- from vcspull .types import ConfigDict
565-
566565 # Create test repos
567566 repo1_path = tmp_path / "repo1"
568567 repo2_path = tmp_path / "repo2"
@@ -573,7 +572,7 @@ async def test_check_repos_status_async_basic(
573572 # repo3 intentionally not created (missing)
574573
575574 repos = t .cast (
576- list [ConfigDict ],
575+ list [" ConfigDict" ],
577576 [
578577 {"name" : "repo1" , "path" : str (repo1_path )},
579578 {"name" : "repo2" , "path" : str (repo2_path )},
@@ -601,8 +600,6 @@ async def test_check_repos_status_async_with_detailed(
601600 tmp_path : pathlib .Path ,
602601) -> None :
603602 """Test async status checking with detailed mode."""
604- from vcspull .types import ConfigDict
605-
606603 repo_path , _remote_path = setup_repo_with_remote (tmp_path )
607604
608605 repos = t .cast (
@@ -630,8 +627,6 @@ async def test_check_repos_status_async_concurrency_limit(
630627 monkeypatch : pytest .MonkeyPatch ,
631628) -> None :
632629 """Test that semaphore limits concurrent operations."""
633- from vcspull .types import ConfigDict
634-
635630 # Create multiple repos
636631 repos_list = []
637632 for i in range (10 ):
You can’t perform that action at this time.
0 commit comments