Skip to content

Commit 5b2c041

Browse files
committed
lint: Fixes from new ruff
The noqa comment was added manually to avoid A005 Module `json` shadows a Python standard-library module Signed-off-by: Jussi Kukkonen <[email protected]>
1 parent 7b5ed5e commit 5b2c041

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

tuf/api/_payload.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1222,7 +1222,7 @@ def __init__(
12221222
self.number_of_bins = 2**bit_length
12231223
# suffix_len is calculated based on "number_of_bins - 1" as the name
12241224
# of the last bin contains the number "number_of_bins -1" as a suffix.
1225-
self.suffix_len = len(f"{self.number_of_bins-1:x}")
1225+
self.suffix_len = len(f"{self.number_of_bins - 1:x}")
12261226

12271227
def __eq__(self, other: object) -> bool:
12281228
if not isinstance(other, SuccinctRoles):

tuf/api/serialization/json.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
verification.
99
"""
1010

11+
# We should not have shadowed stdlib json but that milk spilled already
12+
# ruff: noqa: A005
13+
1114
import json
1215
from typing import Optional
1316

0 commit comments

Comments
 (0)