It's impossible to add docstrings to the top of Python files in Nephthys.
This is because our pre-commit hooks include:
reorder-python-imports, which removes any newlines in between a docstring and imports
ruff-format, which adds a newline in between the docstring and imports
Upstream issues are asottile/reorder-python-imports#366 and psf/black#4175, but neither project is interested in fixing compatibility.
Switching to isort (with the config suggested in a GH comment) might be a way to resolve this conflict.
We don't have any file docstrings at the moment, so it's not an important issue, but definitely worth documenting and probably fixing at some point
It's impossible to add docstrings to the top of Python files in Nephthys.
This is because our pre-commit hooks include:
reorder-python-imports, which removes any newlines in between a docstring and importsruff-format, which adds a newline in between the docstring and importsUpstream issues are asottile/reorder-python-imports#366 and psf/black#4175, but neither project is interested in fixing compatibility.
Switching to
isort(with the config suggested in a GH comment) might be a way to resolve this conflict.We don't have any file docstrings at the moment, so it's not an important issue, but definitely worth documenting and probably fixing at some point