Skip to content

Replace Pylint and isort with Ruff - #25

Open
tomsilver wants to merge 1 commit into
mainfrom
replace-pylint-isort-with-ruff
Open

tomsilver wants to merge 1 commit into
mainfrom
replace-pylint-isort-with-ruff

Conversation

@tomsilver

Copy link
Copy Markdown
Owner

Replace Pylint, pytest-pylint, and isort with Ruff for linting and import sorting. Configure Ruff's standard error checks, Pyflakes, import sorting, and Pylint rules in pyproject.toml; update the local scripts, GitHub Actions, and README; remove .pylintrc.

Keep Black for code formatting and docformatter for wrapping docstring prose. Ruff's docstring formatting handles embedded code examples. CI now checks docformatter output as well. The formatting script stops on failures and accepts docformatter's successful reformatting exit code.

Ruff's Pylint coverage differs from Pylint's, and this configuration uses Ruff's rule defaults rather than translating every legacy setting. Mypy continues to check types. Fix one membership assertion flagged by Ruff in the repository setup script.

Validation: ./run_ci_checks.sh passes under Python 3.10 in a uv-created .venv after uninstalling Pylint, pytest-pylint, and isort. Black, docformatter, and Ruff checks pass. An isolated smoke check confirms import sorting, docstring wrapping, formatting idempotence, and rejection of an undefined name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant