wntrblm / nox

Flexible test automation for Python
https://nox.thea.codes
Apache License 2.0
1.3k stars 148 forks source link

feat: use static arguments instead of **kwargs #815

Closed henryiii closed 4 months ago

henryiii commented 5 months ago

Close #813. This provides better documentation, better signatures, and better static typing. This doesn't change too rapidly, so using ** isn't that helpful. ** is best for things that can't be determined statically.

A few kwargs that previously distinguished between not being passed and being passed now support None, which is simpler and also a little friendlier for callers.

[!WARNING] This removes support for passing keyword arguments through to a function passed into run. run(f, arg1, kw=kw) is not supported anymore. This does keep support for run(f, arg1). There's very little reason to ever do this, as it just runs the function for you with a smidge of logging. It's listed in the comment as a legacy feature. It was a little buggy before too, with env= for example being swallowed.