Skip to content

Commit e360291

Browse files
committed
Condensed possible_config_filenames init
1 parent 0301c17 commit e360291

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

remove-json-keys/src/remove_json_keys/lib/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ def load(cli, caller_file):
3737
cli.project_root = path.join(path.dirname(caller_file),
3838
f"../../{ '' if 'src' in path.dirname(caller_file) else '../../' }")
3939
possible_config_filenames = [
40-
f'{prefix}{name}.config.{ext}'
41-
for prefix in ['.', ''] for name in [cli.short_name, cli.name] for ext in ['json5', 'json', 'jsonc']
40+
f'{prefix}{name}.config.json{suffix}'
41+
for prefix in ['.', ''] for name in [cli.short_name, cli.name] for suffix in ['5', '', 'c']
4242
]
4343
for filename in possible_config_filenames:
4444
cli.config_filepath = path.join(cli.project_root, filename)

translate-messages/src/translate_messages/lib/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ def load(cli, caller_file):
4949
cli.project_root = path.join(path.dirname(caller_file),
5050
f"../../{ '' if 'src' in path.dirname(caller_file) else '../../' }")
5151
possible_config_filenames = [
52-
f'{prefix}{name}.config.{ext}'
53-
for prefix in ['.', ''] for name in [cli.short_name, cli.name] for ext in ['json5', 'json', 'jsonc']
52+
f'{prefix}{name}.config.json{suffix}'
53+
for prefix in ['.', ''] for name in [cli.short_name, cli.name] for suffix in ['5', '', 'c']
5454
]
5555
for filename in possible_config_filenames:
5656
cli.config_filepath = path.join(cli.project_root, filename)

0 commit comments

Comments
 (0)