Since mypy deprecates the implicit use of None for default values, add the explicit None type hint for store in the run_locally method.
The @job decorator is supposed to transform anything into a Job, I think my change is the minimal effort to take to convince type checkers like mypy or pycharm integrated tools that the result will be a Job. Consider the following examples:
mypy_example.py:15: note: Revealed type is "builtins.int"
mypy_example.py:16: note: Revealed type is "jobflow.core.job.Job"
mypy_example.py:17: note: Revealed type is "jobflow.core.job.Job"
Since mypy deprecates the implicit use of None for default values, add the explicit None type hint for
store
in therun_locally
method.The
@job
decorator is supposed to transform anything into aJob
, I think my change is the minimal effort to take to convince type checkers like mypy or pycharm integrated tools that the result will be aJob
. Consider the following examples:Running mypy over this leads to:
Which is the intended behaviour in my opinion.