Use more explicit keywords
See original GitHub issueOur top-level dask.compute
, dask.persist
, and dask.visualize
methods all have **kwargs
in their signature. Certain keyword arguments are then pop
ed off the kwargs
dict
https://github.com/dask/dask/blob/89d93a8264ce81c30207d83de96e3346a15365a4/dask/base.py#L551-L552
and the remaining kwargs
are then forwarded elsewhere
https://github.com/dask/dask/blob/89d93a8264ce81c30207d83de96e3346a15365a4/dask/base.py#L564
It would be nice if the keywords which were pop
ed off kwargs
were instead explicitly marked in the method signature. For example, if compute
s signature was changed from
def compute(*args, **kwargs):
to
def compute(*args, traverse=True, scheduler=None, optimize_graph=True, **kwargs):
This would be it easier to see what keyword arguments are supported by quickly inspecting these method’s signature and would probably lead to better type checking integration. This is relatively low priority, but would be a nice quality of life improvement that, I think, should be relatively straightforward to implement.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Closing as fixed by #8354, thanks @boazmohar !
Yeah I think
token
andparent_meta
are really meant for internal use and aren’t considered to be user-facing so it’s fine to leave them as is.