File tree Expand file tree Collapse file tree 5 files changed +11
-13
lines changed Expand file tree Collapse file tree 5 files changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -463,12 +463,11 @@ def _ensure_workspace_label_for_merge(
463463 relabelled = True
464464 else :
465465 config_data .setdefault ("./" , {})
466+ elif existing_label is None :
467+ workspace_label = preferred_label
468+ config_data .setdefault (workspace_label , {})
466469 else :
467- if existing_label is None :
468- workspace_label = preferred_label
469- config_data .setdefault (workspace_label , {})
470- else :
471- workspace_label = existing_label
470+ workspace_label = existing_label
472471
473472 if workspace_label not in config_data :
474473 config_data [workspace_label ] = {}
Original file line number Diff line number Diff line change 1818from vcspull .cli .add import add_repo , create_add_subparser , handle_add_command
1919
2020if t .TYPE_CHECKING :
21- import pathlib
22-
2321 from _pytest .monkeypatch import MonkeyPatch
2422 from syrupy .assertion import SnapshotAssertion
2523
@@ -753,7 +751,7 @@ def test_handle_add_command_path_mode(
753751 {
754752 "test_id" : test_id ,
755753 "log" : normalized_log .replace ("<config>" , "~/.vcspull.yaml" ),
756- }
754+ },
757755 )
758756 else :
759757 snapshot .assert_match ({"test_id" : test_id , "log" : normalized_log })
@@ -911,7 +909,7 @@ class NoMergePreservationFixture(t.NamedTuple):
911909 repo: git+https://github.com/Stiivi/bubbles.git
912910 cubes:
913911 repo: git+https://github.com/Stiivi/cubes.git
914- """
912+ """ ,
915913 ),
916914 expected_original_repos = (
917915 "Flexget" ,
Original file line number Diff line number Diff line change 1414from vcspull .cli .discover import ConfigScope , _classify_config_scope , discover_repos
1515
1616if t .TYPE_CHECKING :
17- import pathlib
18-
1917 from _pytest .monkeypatch import MonkeyPatch
2018 from syrupy .assertion import SnapshotAssertion
2119
Original file line number Diff line number Diff line change 22
33from __future__ import annotations
44
5- import pathlib
65import textwrap
76import typing as t
87
98import pytest
109
1110from vcspull .config import save_config_yaml_with_items
1211
12+ if t .TYPE_CHECKING :
13+ import pathlib
14+
1315FixtureEntry = tuple [str , dict [str , t .Any ]]
1416
1517
Original file line number Diff line number Diff line change 22
33from __future__ import annotations
44
5- import pathlib
65import typing as t
76
87from vcspull .util import get_config_dir
98
109if t .TYPE_CHECKING :
10+ import pathlib
11+
1112 import pytest
1213
1314
You can’t perform that action at this time.
0 commit comments