Skip to content

Commit

Permalink
Update src/imars3d/backend/util/functions.py
Browse files Browse the repository at this point in the history
use consistent type hinting

Co-authored-by: Pete Peterson <[email protected]>
  • Loading branch information
KedoKudo and peterfpeterson authored Sep 19, 2024
1 parent 0b7f190 commit 683e02e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/imars3d/backend/util/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def clamp_max_workers(max_workers: Union[int, None]) -> int:
return result


def calculate_chunksize(num_elements: int, max_workers: Union[int, None] = None, scale_factor: int = 4) -> int:
def calculate_chunksize(num_elements: int, max_workers: Optional[int] = None, scale_factor: int = 4) -> int:
"""Calculate an optimal chunk size for multiprocessing.
Parameters
Expand Down

0 comments on commit 683e02e

Please sign in to comment.