mirror of
https://github.com/theupdateframework/python-tuf
synced 2026-05-24 10:08:28 +00:00
Manually standardize quotes where black cannot
Black standardizes single to double quotes where feasible. However, it doesn't seem to change double to single quotes nor adds escape characters, as a consequence it skips standardization on strings with mixed quotes. Unfortunately, pylint's quote consistency check also doesn't detect this, so the onus will remain on the reviewer in these cases. **Unrelated changes**: The commit still enables pylint's "check-quote-consistency" just in case it can detect something the black doesn't. The commit also fixes a syntax inconsistency in pylintrc. Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
This commit is contained in:
parent
44aea45fd3
commit
be0cef067c
2 changed files with 6 additions and 3 deletions
|
|
@ -266,12 +266,12 @@ def verify(
|
|||
)
|
||||
|
||||
if not signatures_for_keyid:
|
||||
raise tuf.exceptions.Error(f'no signature for key {key["keyid"]}.')
|
||||
raise tuf.exceptions.Error(f"no signature for key {key['keyid']}.")
|
||||
|
||||
if len(signatures_for_keyid) > 1:
|
||||
raise tuf.exceptions.Error(
|
||||
f"{len(signatures_for_keyid)} signatures for key "
|
||||
f'{key["keyid"]}, not sure which one to verify.'
|
||||
f"{key['keyid']}, not sure which one to verify."
|
||||
)
|
||||
|
||||
if signed_serializer is None:
|
||||
|
|
|
|||
|
|
@ -44,7 +44,10 @@ max-line-length=80
|
|||
single-line-if-stmt=yes
|
||||
|
||||
[LOGGING]
|
||||
logging-format-style: new
|
||||
logging-format-style=new
|
||||
|
||||
[MISCELLANEOUS]
|
||||
notes=TODO
|
||||
|
||||
[STRING]
|
||||
check-quote-consistency=yes
|
||||
|
|
|
|||
Loading…
Reference in a new issue