Marco Ricci commited on 2024-08-16 16:21:45
Zeige 2 geänderte Dateien mit 12 Einfügungen und 12 Löschungen.
We still use error messages with non-sentence case at multiple places, particularly messages like "no valid SSH key selected".
... | ... |
@@ -945,7 +945,7 @@ def derivepassphrase( |
945 | 945 |
break |
946 | 946 |
else: |
947 | 947 |
if not notes_value.strip(): |
948 |
- err('not saving new notes: user aborted request') |
|
948 |
+ err('Not saving new notes: user aborted request') |
|
949 | 949 |
configuration['services'].setdefault(service, {})['notes'] = ( |
950 | 950 |
notes_value.strip('\n') |
951 | 951 |
) |
... | ... |
@@ -1032,9 +1032,9 @@ def derivepassphrase( |
1032 | 1032 |
'ASCII' |
1033 | 1033 |
) |
1034 | 1034 |
except IndexError: |
1035 |
- err('no valid SSH key selected') |
|
1035 |
+ err('No valid SSH key selected') |
|
1036 | 1036 |
except KeyError: |
1037 |
- err('cannot find running SSH agent; check SSH_AUTH_SOCK') |
|
1037 |
+ err('Cannot find running SSH agent; check SSH_AUTH_SOCK') |
|
1038 | 1038 |
except OSError as e: |
1039 | 1039 |
err( |
1040 | 1040 |
f'Cannot connect to SSH agent: {e.strerror}: ' |
... | ... |
@@ -1049,7 +1049,7 @@ def derivepassphrase( |
1049 | 1049 |
elif use_phrase: |
1050 | 1050 |
maybe_phrase = _prompt_for_passphrase() |
1051 | 1051 |
if not maybe_phrase: |
1052 |
- err('no passphrase given') |
|
1052 |
+ err('No passphrase given') |
|
1053 | 1053 |
else: |
1054 | 1054 |
phrase = maybe_phrase |
1055 | 1055 |
if store_config_only: |
... | ... |
@@ -1070,7 +1070,7 @@ def derivepassphrase( |
1070 | 1070 |
if not view.maps[0]: |
1071 | 1071 |
settings_type = 'service' if service else 'global' |
1072 | 1072 |
msg = ( |
1073 |
- f'cannot update {settings_type} settings without ' |
|
1073 |
+ f'Cannot update {settings_type} settings without ' |
|
1074 | 1074 |
f'actual settings' |
1075 | 1075 |
) |
1076 | 1076 |
raise click.UsageError(msg) |
... | ... |
@@ -1080,7 +1080,7 @@ def derivepassphrase( |
1080 | 1080 |
configuration.setdefault('global', {}).update(view) # type: ignore[typeddict-item] |
1081 | 1081 |
assert _types.is_vault_config( |
1082 | 1082 |
configuration |
1083 |
- ), f'invalid vault configuration: {configuration!r}' |
|
1083 |
+ ), f'Invalid vault configuration: {configuration!r}' |
|
1084 | 1084 |
put_config(configuration) |
1085 | 1085 |
else: |
1086 | 1086 |
if not service: |
... | ... |
@@ -1118,7 +1118,7 @@ def derivepassphrase( |
1118 | 1118 |
pass |
1119 | 1119 |
else: |
1120 | 1120 |
msg = ( |
1121 |
- 'no passphrase or key given on command-line ' |
|
1121 |
+ 'No passphrase or key given on command-line ' |
|
1122 | 1122 |
'or in configuration' |
1123 | 1123 |
) |
1124 | 1124 |
raise click.UsageError(msg) |
... | ... |
@@ -938,15 +938,15 @@ contents go here |
938 | 938 |
( |
939 | 939 |
[], |
940 | 940 |
b'', |
941 |
- b'cannot update global settings without actual settings', |
|
941 |
+ b'Cannot update global settings without actual settings', |
|
942 | 942 |
), |
943 | 943 |
( |
944 | 944 |
['sv'], |
945 | 945 |
b'', |
946 |
- b'cannot update service settings without actual settings', |
|
946 |
+ b'Cannot update service settings without actual settings', |
|
947 | 947 |
), |
948 |
- (['--phrase', 'sv'], b'', b'no passphrase given'), |
|
949 |
- (['--key'], b'', b'no valid SSH key selected'), |
|
948 |
+ (['--phrase', 'sv'], b'', b'No passphrase given'), |
|
949 |
+ (['--key'], b'', b'No valid SSH key selected'), |
|
950 | 950 |
], |
951 | 951 |
) |
952 | 952 |
def test_225_store_config_fail( |
... | ... |
@@ -1033,7 +1033,7 @@ contents go here |
1033 | 1033 |
assert result.exit_code != 0, 'program unexpectedly succeeded' |
1034 | 1034 |
assert result.stderr_bytes is not None |
1035 | 1035 |
assert ( |
1036 |
- b'no passphrase or key given' in result.stderr_bytes |
|
1036 |
+ b'No passphrase or key given' in result.stderr_bytes |
|
1037 | 1037 |
), 'expected error message missing' |
1038 | 1038 |
|
1039 | 1039 |
def test_230_config_directory_nonexistant(self, monkeypatch: Any) -> None: |
1040 | 1040 |