Skip to content

Commit aee839f

Browse files
committed
fix: resolve CI workflow failures
- Fix mypy no-any-return error by casting comparison to bool - Update pre-commit config to only check pathao package files - Prevents mypy from checking tests and examples in pre-commit hooks
1 parent 1edf715 commit aee839f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ repos:
2424
hooks:
2525
- id: mypy
2626
additional_dependencies: [types-requests]
27-
args: [--config-file=mypy.ini]
27+
files: ^pathao/.*\.py$

pathao/http_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def _should_retry(self, exception: Exception, attempt: int) -> bool:
214214

215215
# Retry on server errors (5xx)
216216
if isinstance(exception, HTTPError):
217-
return exception.response.status_code >= 500
217+
return bool(exception.response.status_code >= 500)
218218

219219
# Retry on general request exceptions
220220
if isinstance(exception, RequestException):

0 commit comments

Comments
 (0)