Spaces:
Running
Running
Commit
·
cace02f
1
Parent(s):
499170b
fix: resolve mypy divergence between make check and pre-commit
Browse files- Add tenacity>=8.2 to pre-commit mypy additional_dependencies
- Remove now-unnecessary type: ignore comment from pubmed.py
Root cause: pre-commit mypy was missing tenacity, so it couldn't
resolve the
@retry
decorator's type signature.
- .pre-commit-config.yaml +1 -0
- src/tools/pubmed.py +1 -1
.pre-commit-config.yaml
CHANGED
|
@@ -14,4 +14,5 @@ repos:
|
|
| 14 |
additional_dependencies:
|
| 15 |
- pydantic>=2.7
|
| 16 |
- pydantic-settings>=2.2
|
|
|
|
| 17 |
args: [--ignore-missing-imports]
|
|
|
|
| 14 |
additional_dependencies:
|
| 15 |
- pydantic>=2.7
|
| 16 |
- pydantic-settings>=2.2
|
| 17 |
+
- tenacity>=8.2
|
| 18 |
args: [--ignore-missing-imports]
|
src/tools/pubmed.py
CHANGED
|
@@ -42,7 +42,7 @@ class PubMedTool:
|
|
| 42 |
params["api_key"] = self.api_key
|
| 43 |
return params
|
| 44 |
|
| 45 |
-
@retry(
|
| 46 |
stop=stop_after_attempt(3),
|
| 47 |
wait=wait_exponential(multiplier=1, min=1, max=10),
|
| 48 |
reraise=True,
|
|
|
|
| 42 |
params["api_key"] = self.api_key
|
| 43 |
return params
|
| 44 |
|
| 45 |
+
@retry(
|
| 46 |
stop=stop_after_attempt(3),
|
| 47 |
wait=wait_exponential(multiplier=1, min=1, max=10),
|
| 48 |
reraise=True,
|