Skip to content

Commit

Permalink
Merge pull request #654 from FabiPi3/fix_job_annotation_again
Browse files Browse the repository at this point in the history
fix @job annotation again (again)
  • Loading branch information
utf authored Jul 30, 2024
2 parents 4a73858 + 2fdf82e commit a740c6c
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/jobflow/core/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,22 @@ class JobConfig(MSONable):


@overload
def job(method: Callable = None) -> Callable[..., Job]:
def job(method: Callable | None = None) -> Callable[..., Job]:
pass


@overload
def job(method: Callable = None, **job_kwargs) -> Callable[..., Callable[..., Job]]:
def job(method: Callable, **job_kwargs) -> Callable[..., Job]:
pass


@overload
def job(method: None = None, **job_kwargs) -> Callable[..., Callable[..., Job]]:
pass


def job(
method: Callable = None, **job_kwargs
method: Callable | None = None, **job_kwargs
) -> Callable[..., Job] | Callable[..., Callable[..., Job]]:
"""
Wrap a function to produce a :obj:`Job`.
Expand Down

0 comments on commit a740c6c

Please sign in to comment.