Skip to content

CI: It's impossible to add file docstrings #61

@MMK21Hub

Description

@MMK21Hub

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions