Skip to content

Commit

Permalink
mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdudfield committed Jan 2, 2025
1 parent 9154578 commit 8cef147
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/nwp_consumer/internal/services/consumer_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ def _parallelize_generator[T](
if os.getenv("CONCURRENCY", "True").capitalize() == "False":
n_jobs = 1
elif os.getenv("NUMBER_CONCURRENT_JOBS") is not None:
n_jobs = int(str(os.getenv("NUMBER_CONCURRENT_JOBS")))
number_of_current_jobs = os.getenv("NUMBER_CONCURRENT_JOBS")
assert number_of_current_jobs is not None

Check failure on line 114 in src/nwp_consumer/internal/services/consumer_service.py

View workflow job for this annotation

GitHub Actions / lint-typecheck

Ruff (S101)

src/nwp_consumer/internal/services/consumer_service.py:114:13: S101 Use of `assert` detected
assert number_of_current_jobs.isnumeric()

Check failure on line 115 in src/nwp_consumer/internal/services/consumer_service.py

View workflow job for this annotation

GitHub Actions / lint-typecheck

Ruff (S101)

src/nwp_consumer/internal/services/consumer_service.py:115:13: S101 Use of `assert` detected
n_jobs = int(number_of_current_jobs)
log.debug(f"Using {n_jobs} concurrent thread(s)")

return Parallel( # type: ignore
Expand Down

0 comments on commit 8cef147

Please sign in to comment.