Skip to content

Commit

Permalink
Remove an unnecessary "Optional" type hint
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dav3r committed Nov 22, 2024
1 parent 6c67ca5 commit 61ee124
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cyhy_cvesync/models/config_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
Expand Down

0 comments on commit 61ee124

Please sign in to comment.