hackclub / hackclub/nephthys

CI: It's impossible to add file docstrings

Open
#61 0 comments 0 reactions 0 assignees View on GitHub
codebase
Dominant language
Python
Stars
19
Forks
49
Avg merge
2d 21h
Merged PRs (30d)
6

Description

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 https://github.com/asottile/reorder-python-imports/issues/366 and https://github.com/psf/black/issues/4175, but neither project is interested in fixing compatibility.

Switching to `isort` ([with the config suggested in a GH comment](https://github.com/psf/black/issues/4175#issuecomment-1915522848)) 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_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.