Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ line-length = 88
target-version = "py311"

[tool.ruff.lint]
select = ["E4", "E7", "E9", "F", "UP", "S", "ANN", "C4", "I", "RUF", "SIM", "PLR", "ERA", "RET", "B"]
select = ["E4", "E7", "E9", "F", "UP", "S", "ANN", "C4", "I", "RUF", "SIM", "PLR", "ERA", "RET", "B", "A"]
# select = ["ALL"]
ignore = ["ANN003", "ANN401", "D", "COM"]

Expand Down
2 changes: 1 addition & 1 deletion src/pythonxbox/api/provider/catalog/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async def get_products(

async def get_product_from_alternate_id(
self,
id: str,
id: str, # noqa: A002
id_type: AlternateIdType,
fields: FieldsTemplate = FieldsTemplate.DETAILS,
top: int = 25,
Expand Down
4 changes: 2 additions & 2 deletions src/pythonxbox/common/ratelimits/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class SingleRateLimit(RateLimit):
This class is mainly used by the CombinedRateLimit class.
"""

def __init__(self, time_period: TimePeriod, type: LimitType, limit: int) -> None:
def __init__(self, time_period: TimePeriod, type: LimitType, limit: int) -> None: # noqa: A002
self.__time_period = time_period
self.__type = type
self.__limit = limit
Expand Down Expand Up @@ -148,7 +148,7 @@ class CombinedRateLimit(RateLimit):

"""

def __init__(self, *parsed_limits: ParsedRateLimit, type: LimitType) -> None:
def __init__(self, *parsed_limits: ParsedRateLimit, type: LimitType) -> None: # noqa: A002
# *parsed_limits is a tuple

# Create a SingleRateLimit instance for each limit
Expand Down
5 changes: 2 additions & 3 deletions src/pythonxbox/common/request_signer.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,8 @@ def _sign_raw(

@staticmethod
def _hash(data: bytes) -> bytes:
hash = hashlib.sha256()
hash.update(data)
return hash.digest()
"""Compute SHA-256 hash of the input data."""
return hashlib.sha256(data).digest()

@staticmethod
def _concat_data_to_sign( # noqa: PLR0913
Expand Down
Loading