Skip to content

Commit 99ccfe4

Browse files
authored
Enable ruff eradicate rule (ERA) (#38)
1 parent 50bf269 commit 99ccfe4

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ line-length = 88
4848
target-version = "py311"
4949

5050
[tool.ruff.lint]
51-
select = ["E4", "E7", "E9", "F", "UP", "S", "ANN", "C4", "I", "RUF", "SIM", "PLR"]
51+
select = ["E4", "E7", "E9", "F", "UP", "S", "ANN", "C4", "I", "RUF", "SIM", "PLR", "ERA"]
5252
# select = ["ALL"]
5353
ignore = ["ANN003", "ANN401", "D", "COM"]
5454

src/pythonxbox/api/provider/ratelimitedprovider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def __parse_rate_limit_key(
7373
# TODO: schema here?
7474
# Since the key-value pairs match we can just pass the dict to the model
7575
return ParsedRateLimit(**key, period=period)
76-
# return ParsedRateLimit(read=key["read"], write=key["write"])
76+
7777
else:
7878
raise XboxException(
7979
"RATE_LIMITS value types not recognised. Must be one of 'int, 'dict'."

src/pythonxbox/authentication/models.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ def is_valid(self) -> bool:
2222

2323

2424
class XADDisplayClaims(BaseModel):
25-
# {"xdi": {"did": "F.....", "dcs": "0"}}
25+
"""{"xdi": {"did": "F.....", "dcs": "0"}}"""
26+
2627
xdi: dict[str, str]
2728

2829

src/pythonxbox/common/ratelimits/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ def __check_if_exceeded(self) -> None:
126126
if not self.__exceeded and self.__counter >= self.__limit:
127127
self.__exceeded = True
128128
# reset-after is now dependent on the time since the first request of this cycle.
129-
# self.__set_reset_after()
130129

131130
def __reset_counter_if_required(self) -> None:
132131
# Check to make sure reset_after is not None

0 commit comments

Comments
 (0)