Repository navigation
ci: Replace black, isort, pylint and pre-commit with ruff - #89
Open
kylebarron wants to merge 1 commit into
Open
kylebarron wants to merge 1 commit into
kylebarron wants to merge 1 commit into
Conversation
Configure ruff with the same rule set as pydelatin and fix what it flags. The Python changes are formatting, Google-style docstrings, type hints, and `__all__` in the package root. Behavior is unchanged; encoded output is byte-identical before and after this change. Where a rule would change the public API or behavior, it is silenced inline with a reason: - `S101`: argument checks in `encode`, `to_ecef` and `zig_zag_encode` keep raising `AssertionError`, which callers may rely on. - `PLR0913`: `encode` keeps its existing keyword arguments. - `FURB122`: extensions are written with `f.write` in a loop, so `f` only needs a `write` method, not `writelines`. Exclude the `site/` React demo from ruff. Until the tests move to `tests/`, the per-file test ignores apply to `test/`, plus `INP001`, since a `test/__init__.py` would shadow the stdlib `test` package. Remove the unused .pylintrc and pre-commit config. In CI, run on pushes to the renamed `main` branch, drop the pre-commit step (it only ran on a Python version no longer in the matrix), and add a ruff lint and format check job. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kylebarron
added this pull request to stack #91
October 5, 2026 21:52
This branch has not been deployed
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.
Note
This PR was written by Claude (Claude Code), not by @kylebarron.
Replaces black, isort and pylint, plus the pre-commit config that ran them, with ruff, using the same rule set as pydelatin and pymartini.
Changes
ruff formatandruff checkpass on everything, including the README's Python examples.site/(the React demo) is excluded.__all__in the package root. Behavior is unchanged: encoded output is byte-identical before and after (checked with sha256 across all sphere methods, ellipsoids and extensions).noqas, each with a reason:S101: argument checks inencode,to_ecefandzig_zag_encodekeep raisingAssertionError, which callers may rely on.PLR0913:encodekeeps its keyword arguments.FURB122: extensions are written withf.write, sofonly needs awritemethod..pylintrcand.pre-commit-config.yaml.main, with the dead pre-commit step removed and aLintjob (ruff check and format check) added.For review
#74 will conflict. It touches
occlusion.py, which this PR reformats and adds docstrings to. The conflict should be mechanical to resolve.🤖 Written by Claude Code