Skip to content

🔧 build(lint): adopt simplint 0.7.1 - #316

Merged
gaborbernat merged 8 commits into
mainfrom
simplint
Nov 7, 2026
Merged

gaborbernat merged 8 commits into
mainfrom
simplint

Conversation

@gaborbernat

Copy link
Copy Markdown
Member

Adds simplint 0.7.1 to pre-commit, so the conventions Ruff cannot check are enforced on every change rather than in review. 🧹 The public API is unchanged: Index, IndexServer and __version__ still import from devpi_process. Ruff's undocumented-* rules give way to simplint's undocumented-public-api, which asks for reST documentation only on what the package exports. Hooks run as Ruff lint, then simplint, then Ruff format, with explicit prek priorities so independent hooks run in parallel; pre-commit ignores the key.

Commits

Each commit is one step, so the review can tell what simplint did on its own from what needed hand work:

  • the config;
  • simplint check --fix --unsafe-fixes, untouched;
  • the manual fixes, one per topic: the free-port helper inlined; the package __init__ keeps only re-exports, with IndexServer and Index moving to their own private modules; the documented fields get descriptions; every suppression gets a reason; test fixture names become constants;
  • last, cleanup of what the autofixes left: parentheses around a returned condition and a comment that only restated its method.

Ruff's undocumented-* rules ask for docstrings that simplint's
function-docstring rule removes from internal code, so simplint refuses to
run with them on. undocumented-public-api covers the public API instead, in
reST.
Applied with simplint 0.7.1 --fix --unsafe-fixes, then the formatters via prek.
The classes move to _server.py and _index.py, so the package __init__ holds
re-exports only. Imports from devpi_process stay the same.
Fields with no description name a parameter without saying what it is, and a
:param: that repeats its name adds nothing. The one-line reprs and __enter__
become imperative sentences, since a :returns: field there reads as a
non-imperative summary.
simplint's suppression-without-reason wants the why after each ignore and pragma, so a later reader can tell whether it still applies.
The fixture module is loaded by path, so its names are private constants; Final keeps them from being reassigned.
The inlined return kept parentheses around each division, and the autofix turned the _setup_client docstring into a comment that only restates the method.
@gaborbernat gaborbernat added enhancement New feature or request skip news No user-facing changelog entry is needed labels Nov 7, 2026
@gaborbernat
gaborbernat marked this pull request as ready for review November 7, 2026 05:51
@gaborbernat
gaborbernat merged commit a662a79 into main Nov 7, 2026
21 checks passed
@gaborbernat
gaborbernat deleted the simplint branch November 7, 2026 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request skip news No user-facing changelog entry is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant