Skip to content

Commit

Permalink
Merge pull request #673 from davidwaroquiers/fix_Job_docstring
Browse files Browse the repository at this point in the history
Fix docstring in Job.
  • Loading branch information
utf authored Nov 18, 2024
2 parents cef3584 + ba7be5f commit c374d24
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/jobflow/core/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,20 +297,20 @@ class Job(MSONable):
--------
Builtin functions such as :obj:`print` can be specified.
>>> print_task = Job(function=print, args=("I am a job", ))
>>> print_task = Job(function=print, function_args=("I am a job", ))
Or other functions of the Python standard library.
>>> import os
>>> Job(function=os.path.join, args=("folder", "filename.txt"))
>>> Job(function=os.path.join, function_args=("folder", "filename.txt"))
To use custom functions, the functions should be importable (i.e. not
defined in another function). For example, if the following function is defined
in the ``my_package`` module.
>>> def add(a, b):
... return a + b
>>> add_job = Job(function=add, args=(1, 2))
>>> add_job = Job(function=add, function_args=(1, 2))
More details are given in the :obj:`job` decorator docstring.
Expand Down

0 comments on commit c374d24

Please sign in to comment.