cherab / core

The core source repository for the Cherab project.
https://www.cherab.info
Other
44 stars 24 forks source link

Fix incorrect docstrings for atomic rate base classes #432

Closed vsnever closed 3 months ago

vsnever commented 4 months ago

This updates the docstrings for the atomic process rate base classes and fixes #431.

vsnever commented 3 months ago

Thanks for the reviews, @Mateasek, @jacklovell.

Changing the names of the arguments is technically a breaking change for anybody passing arguments as keywords to these functions. I get that aesthetically it's nicer to have a uniform convention of density and temperature as names, but have you checked there's nowhere else in the code that calls these by keyword (may not be covered by existing unit tests)? I'd be inclined to leave the argument names as they are and only update the docstrings.

Yes, indeed, in Python positional arguments can also be passed by keyword, and changing the name of a positional argument can cause a TypeError. I did not think about that. I returned the arguments to their old names.