[Documentation] ExecutorBase.submit() missing 1 required positional argument: 'fn'
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77
- Forks
- 7
- Avg merge
- 10h 32m
- Merged PRs (30d)
- 12
Description
When the function is set explicitly in the submit() function executorlib raises and error message:
ExecutorBase.submit() missing 1 required positional argument: 'fn'
For example:
import executorlib
def sum_funct(a,b):
return sum([a, b])
with executorlib.SingleNodeExecutor() as exe:
f = exe.submit(fn=sum_funct, a=1, b=2)
print(f.result())
This behavior is consistent with the concurrent.futures.ThreadPoolExecutor which raises a similar error message:
from concurrent.futures import ThreadPoolExecutor
def sum_funct(a,b):
return sum([a, b])
with ThreadPoolExecutor() as exe:
f = exe.submit(fn=sum_funct, a=1, b=2)
print(f.result())
Raises:
TypeError: ThreadPoolExecutor.submit() missing 1 required positional argument: 'fn'
Still there were older versions of executorlib<=1.0.1 which did not raise this error message.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the documentation for ExecutorBase.submit() and compare its documented calling convention with the example in the issue and Python's concurrent.futures behavior. Confirm whether the current error is expected and clarify the documented usage or compatibility note accordingly. Done means the submit() behavior and the older-version difference are clearly explained.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100