Skip to content

Commit

Permalink
chore: updated ruff rules
Browse files Browse the repository at this point in the history
  • Loading branch information
ddkasa committed Jun 22, 2024
1 parent 9ba67fd commit 730984e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ files
*,cover
coverage.xml
logs
cache/cache.sqlite
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ ignore = [
"PLW2901",
"UP017", # Python 3.10 backwards compatiblity
"PLR6301", # Class Method Suggestion
"S311", # Unsafe pseudo-random generator
]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
Expand Down
2 changes: 1 addition & 1 deletion toggl_api/modules/meta/base_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class property if set to None.
msg = "Request failed with status code %s: %s"
log.error(msg, response.status_code, response.text)
if response.status_code % 100 == self.SERVER_ERROR:
delay = random.randint(1, 5) # noqa: S311
delay = random.randint(1, 5)
log.error("Status code is a server error. Retrying request in %s seconds", delay)
time.sleep(delay)
return self.request(parameters, headers, body, method)
Expand Down

0 comments on commit 730984e

Please sign in to comment.