Skip to content

Commit db7e74c

Browse files
committed
refactor(cli)!: do not copy jsons from global config.
1 parent 37a16da commit db7e74c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/vectorcode/subcommands/init.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,6 @@ async def init(configs: Config) -> int:
114114
else:
115115
os.makedirs(project_config_dir, exist_ok=True)
116116
for item in (
117-
"config.json5",
118-
"config.json",
119117
"vectorcode.include",
120118
"vectorcode.exclude",
121119
):

tests/subcommands/test_init.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,11 @@ async def test_init_copies_global_config(capsys):
8888

8989
# Assert files were copied
9090
assert return_code == 0
91-
assert copyfile_mock.call_count == len(config_items)
91+
assert copyfile_mock.call_count == sum(
92+
# not copying `json`s.
93+
"json" not in i
94+
for i in config_items.keys()
95+
)
9296

9397
# Check output messages
9498
captured = capsys.readouterr()

0 commit comments

Comments
 (0)