Skip to content

Commit

Permalink
fix docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-janssen committed Feb 2, 2025
1 parent 814c0d2 commit acf4693
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions executorlib/interfaces/flux.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class FluxJobExecutor:
>>> def init_k():
>>> return {"k": 3}
>>>
>>> with FluxJobExecutor(cores=2, init_function=init_k) as p:
>>> with FluxJobExecutor(max_workers=2, init_function=init_k) as p:
>>> fs = p.submit(calc, 2, j=4)
>>> print(fs.result())
[(array([2, 4, 3]), 2, 0), (array([2, 4, 3]), 2, 1)]
Expand Down Expand Up @@ -280,7 +280,7 @@ class FluxClusterExecutor:
>>> def init_k():
>>> return {"k": 3}
>>>
>>> with Executor(cores=2, init_function=init_k) as p:
>>> with FluxClusterExecutor(max_workers=2, init_function=init_k) as p:
>>> fs = p.submit(calc, 2, j=4)
>>> print(fs.result())
[(array([2, 4, 3]), 2, 0), (array([2, 4, 3]), 2, 1)]
Expand Down
4 changes: 2 additions & 2 deletions executorlib/interfaces/single.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class SingleNodeExecutor:
Examples:
```
>>> import numpy as np
>>> from executorlib.interfaces.local import SingleNodeExecutor
>>> from executorlib.interfaces.single import SingleNodeExecutor
>>>
>>> def calc(i, j, k):
>>> from mpi4py import MPI
Expand All @@ -70,7 +70,7 @@ class SingleNodeExecutor:
>>> def init_k():
>>> return {"k": 3}
>>>
>>> with SingleNodeExecutor(cores=2, init_function=init_k) as p:
>>> with SingleNodeExecutor(max_workers=2, init_function=init_k) as p:
>>> fs = p.submit(calc, 2, j=4)
>>> print(fs.result())
[(array([2, 4, 3]), 2, 0), (array([2, 4, 3]), 2, 1)]
Expand Down
4 changes: 2 additions & 2 deletions executorlib/interfaces/slurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class SlurmClusterExecutor:
>>> def init_k():
>>> return {"k": 3}
>>>
>>> with SlurmClusterExecutor(cores=2, init_function=init_k) as p:
>>> with SlurmClusterExecutor(max_workers=2, init_function=init_k) as p:
>>> fs = p.submit(calc, 2, j=4)
>>> print(fs.result())
[(array([2, 4, 3]), 2, 0), (array([2, 4, 3]), 2, 1)]
Expand Down Expand Up @@ -259,7 +259,7 @@ class SlurmJobExecutor:
>>> def init_k():
>>> return {"k": 3}
>>>
>>> with SlurmJobExecutor(cores=2, init_function=init_k) as p:
>>> with SlurmJobExecutor(max_workers=2, init_function=init_k) as p:
>>> fs = p.submit(calc, 2, j=4)
>>> print(fs.result())
[(array([2, 4, 3]), 2, 0), (array([2, 4, 3]), 2, 1)]
Expand Down

0 comments on commit acf4693

Please sign in to comment.