Skip to content

Commit 524ed04

Browse files
committed
Deleted trailing spaces
1 parent 2b32797 commit 524ed04

8 files changed

Lines changed: 12 additions & 12 deletions

File tree

remove-json-keys/noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def bump_minor(session, no_push=True):
2727
if no_push : cmd.append('--no-push')
2828
session.run(*cmd, *session.posargs)
2929
@session
30-
def bump_feat(session, no_push=True):
30+
def bump_feat(session, no_push=True):
3131
bump_minor(session, no_push)
3232
@session
3333
def bump_major(session, no_push=True):

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def get_msgs(cli: sn, lang_code: str = 'en') -> sn:
6565

6666
msgs = data.json.flatten(data.json.read( # local ones
6767
Path(__file__).parent.parent / '_locales/en/messages.json'))
68-
68+
6969
if not lang_code.startswith('en'): # fetch non-English msgs from jsDelivr
7070
msgs_host_url = f'{jsdelivr.create_commit_url(cli, cli.commit_hashes.locales)}/src/remove_json_keys/_locales/'
7171
msg_href = f'{msgs_host_url}{lang_code}/messages.json'

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def get_canonical_key(key: str) -> Optional[str]:
4444
else stripped_key if hasattr(controls, stripped_key) \
4545
else None
4646

47-
def is_neg_key(key: str) -> bool :
47+
def is_neg_key(key: str) -> bool :
4848
return bool(re.match(r'^(?:no|disable|exclude)_', string.removeprefix(key, 'legacy_')))
4949

5050
def load(cli: sn) -> None:
@@ -65,7 +65,7 @@ def load(cli: sn) -> None:
6565
f'{cli.msgs.err_INVALID_KEY} {config_key!r} {cli.msgs.err_FOUND_IN}'
6666
f'\n{log.colors.gry}{cli.config_filepath}',
6767
cmd='init')
68-
for config_key, config_val in config_data.items():
68+
for config_key, config_val in config_data.items():
6969
canonical_key = get_canonical_key(config_key)
7070
if canonical_key and config_key != canonical_key: # re-map config_key -> canonical_key
7171
log.warn_legacy_option(cli, config_key, source='config')
@@ -84,7 +84,7 @@ def load(cli: sn) -> None:
8484
for ctrl_key, ctrl in vars(controls).items(): # add args to argp
8585
kwargs = ctrl.__dict__.copy()
8686
args = kwargs.pop('args')
87-
argparse_kwargs = { key:val for key,val in kwargs.items() if key in valid_argparse_kwargs }
87+
argparse_kwargs = { key:val for key,val in kwargs.items() if key in valid_argparse_kwargs }
8888
if ctrl_key.startswith('legacy_'): # copy canonical attrs first
8989
canonical_key = get_canonical_key(ctrl_key)
9090
if canonical_key: # adjust argparse_kwargs

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ def validate(url: str, allowed_schemes: Tuple[str, ...] = ('http', 'https'),
2929
input_domain = parsed_url.netloc.lower()
3030
if not any(input_domain.endswith(allowed_domain.lower()) for allowed_domain in allowed_domains):
3131
raise ValueError(f'URL domain {input_domain!r} not allowed. Allowed: {allowed_domains}')
32-
32+
3333
return url

translate-messages/noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def bump_minor(session, no_push=True):
2727
if no_push : cmd.append('--no-push')
2828
session.run(*cmd, *session.posargs)
2929
@session
30-
def bump_feat(session, no_push=True):
30+
def bump_feat(session, no_push=True):
3131
bump_minor(session, no_push)
3232
@session
3333
def bump_major(session, no_push=True):

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def get_msgs(cli: sn, lang_code: str = 'en') -> sn:
9797

9898
msgs = data.json.flatten(data.json.read( # local ones
9999
Path(__file__).parent.parent / '_locales/en/messages.json'))
100-
100+
101101
if not lang_code.startswith('en'): # fetch non-English msgs from jsDelivr
102102
msgs_host_url = f'{jsdelivr.create_commit_url(cli, cli.commit_hashes.locales)}/src/translate_messages/_locales/'
103103
msg_href = f'{msgs_host_url}{lang_code}/messages.json'

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def get_canonical_key(key: str) -> Optional[str]:
5454
else stripped_key if hasattr(controls, stripped_key) \
5555
else None
5656

57-
def is_neg_key(key: str) -> bool :
57+
def is_neg_key(key: str) -> bool :
5858
return bool(re.match(r'^(?:no|disable|exclude)_', string.removeprefix(key, 'legacy_')))
5959

6060
def load(cli: sn) -> None:
@@ -75,7 +75,7 @@ def load(cli: sn) -> None:
7575
f'{cli.msgs.err_INVALID_KEY} {config_key!r} {cli.msgs.err_FOUND_IN}'
7676
f'\n{log.colors.gry}{cli.config_filepath}',
7777
cmd='init')
78-
for config_key, config_val in config_data.items():
78+
for config_key, config_val in config_data.items():
7979
canonical_key = get_canonical_key(config_key)
8080
if canonical_key and config_key != canonical_key: # re-map config_key -> canonical_key
8181
log.warn_legacy_option(cli, config_key, source='config')
@@ -94,7 +94,7 @@ def load(cli: sn) -> None:
9494
for ctrl_key, ctrl in vars(controls).items(): # add args to argp
9595
kwargs = ctrl.__dict__.copy()
9696
args = kwargs.pop('args')
97-
argparse_kwargs = { key:val for key,val in kwargs.items() if key in valid_argparse_kwargs }
97+
argparse_kwargs = { key:val for key,val in kwargs.items() if key in valid_argparse_kwargs }
9898
if ctrl_key.startswith('legacy_'): # copy canonical attrs first
9999
canonical_key = get_canonical_key(ctrl_key)
100100
if canonical_key: # adjust argparse_kwargs

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ def validate(url: str, allowed_schemes: Tuple[str, ...] = ('http', 'https'),
2929
input_domain = parsed_url.netloc.lower()
3030
if not any(input_domain.endswith(allowed_domain.lower()) for allowed_domain in allowed_domains):
3131
raise ValueError(f'URL domain {input_domain!r} not allowed. Allowed: {allowed_domains}')
32-
32+
3333
return url

0 commit comments

Comments
 (0)