Skip to content

Commit be0cef0

Browse files
author
Lukas Puehringer
committed
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>
1 parent 44aea45 commit be0cef0

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

tuf/api/metadata.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,12 +266,12 @@ def verify(
266266
)
267267

268268
if not signatures_for_keyid:
269-
raise tuf.exceptions.Error(f'no signature for key {key["keyid"]}.')
269+
raise tuf.exceptions.Error(f"no signature for key {key['keyid']}.")
270270

271271
if len(signatures_for_keyid) > 1:
272272
raise tuf.exceptions.Error(
273273
f"{len(signatures_for_keyid)} signatures for key "
274-
f'{key["keyid"]}, not sure which one to verify.'
274+
f"{key['keyid']}, not sure which one to verify."
275275
)
276276

277277
if signed_serializer is None:

tuf/api/pylintrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ max-line-length=80
4444
single-line-if-stmt=yes
4545

4646
[LOGGING]
47-
logging-format-style: new
47+
logging-format-style=new
4848

4949
[MISCELLANEOUS]
5050
notes=TODO
51+
52+
[STRING]
53+
check-quote-consistency=yes

0 commit comments

Comments
 (0)