From 61ee124dd796dae229548f471c1f692a3cd56c21 Mon Sep 17 00:00:00 2001 From: David Redmin Date: Fri, 22 Nov 2024 10:10:21 -0500 Subject: [PATCH] Remove an unnecessary "Optional" type hint This was causing mypy 1.13 to throw an error like this: src/cyhy_cvesync/main.py:63: error: Argument 3 to "process_urls" has incompatible type "int | None"; expected "int" [arg-type] The current version of mypy used in by pre-commit is 1.10.0 and it was NOT flagging this error, but my local mypy 1.13.0 was so I went ahead and fixed it. All pytests still pass after this change. --- src/cyhy_cvesync/models/config_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cyhy_cvesync/models/config_model.py b/src/cyhy_cvesync/models/config_model.py index e9827c3..b84b828 100644 --- a/src/cyhy_cvesync/models/config_model.py +++ b/src/cyhy_cvesync/models/config_model.py @@ -31,7 +31,7 @@ class CVESync(BaseModel): None, description="Logging level", ) - url_concurrency: Optional[int] = Field( + url_concurrency: int = Field( default=10, description="Number of concurrent URL requests to fetch and process CVE data", )