chore: consolidate tool config and repair pre-commit hooks - #143
Open
CuriousLearner wants to merge 1 commit into
Open
chore: consolidate tool config and repair pre-commit hooks#143CuriousLearner wants to merge 1 commit into
CuriousLearner wants to merge 1 commit into
Conversation
Remove ruff.toml and keep the equivalent [tool.ruff] sections in pyproject.toml so ruff, pytest and coverage config all live in one file. The two declared byte-identical settings; ruff resolves the same configuration after the change. Rewrite .pre-commit-config.yaml, which could not run at all. It used the git:// protocol GitHub disabled in 2022, referenced a ruff hook that the pre-commit-hooks repo does not provide, pinned black at a rev that no longer exists under an org that no longer hosts it, and requested a Python version below requires-python. The replacement uses https URLs, current revs, and the official astral-sh/ruff-pre-commit hook. Black is dropped because it formats at 88 columns while ruff is configured at 120 and CI enforces only ruff. Drop the sphinx_rtd_theme options from docs/conf.py, which the configured sphinx_book_theme does not accept, refresh the stale version fallback, and extend a short RST heading underline. The docs now build without warnings. Remove the Framework :: Django :: 2.0 classifier, which is below the declared django>=2.1.5 floor.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ruff.tomland the[tool.ruff]sections inpyproject.tomldeclared byte-identical settings. Ruff readsruff.tomlfirst, so thepyproject.tomlblock was dead config that would have silently diverged. Deleteruff.tomland keep the settings inpyproject.toml, alongside the pytest and coverage config that already lives there..pre-commit-config.yamlcould not run at all. It fetched hooks over thegit://protocol, which GitHub disabled in 2022, pinnedambv/blackat astabletag that no longer exists, listed aruffhook under a repository that does not provide one, and setlanguage_version: python3.7, below the project's supported floor. It is rewritten to use HTTPS, the officialastral-sh/ruff-pre-commit, and a small set of basic hooks. Black is dropped: it formats at 88 columns while ruff is configured at 120, and CI only enforces ruff. The ruff hook is pinned to the same version asrequirements/testing.txtso the hook and CI cannot drift. Two files carried a stray blank line at end of file and are fixed so the new hooks pass on a clean checkout.docs/conf.pypassedsphinx_rtd_themeoptions tosphinx_book_theme, which emitted an unsupported-option warning for each on every build. The two options that did not warn resolve to values identical to the theme's own defaults, so removing the block changes nothing about rendering. The version fallback used when the package import fails was two releases stale. A section heading indocs/configuration.rsthad an underline shorter than its title.Verified against a docs build: 5 warnings before, none after. The
Framework :: Django :: 2.0classifier is removed, since the dependency floor isdjango>=2.1.5and the lowest tested environment is Django 2.2.Test plan
ruff check --show-settingsbefore and after deletingruff.toml. The only difference is the reported settings path; line length, exclude list, rule selection, and isort configuration are byte-identical.docs/requirements.txt: zero warnings.