-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GitHub Action to spellcheck and lint Python code #333
Conversation
This repo is already formatted with (Same goes for the spellchecker: no objection to having one, but please make it a dev dep.) |
6ad04f7
to
2c209b7
Compare
Makefile
Outdated
@@ -13,7 +13,9 @@ bootstrap: $(VENV)/bin/pip | |||
$(VENV)/bin/pip install -e .[dev] | |||
|
|||
format: | |||
$(VENV)/bin/black . | |||
$(VENV)/bin/codespell | |||
$(VENV)/bin/ruff check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this needs to be ruff check --fix
to perform changes, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some folks want ruff to autofix but others do not often because they are used to flake8 which never fixes.
Thanks @cclauss, two nitpicks but this LGTM overall 🙂 |
macOS with Python 3.7 is failing for unrelated reasons: actions/setup-python#856 |
Co-authored-by: William Woodruff <[email protected]>
.github/workflows/tests.yml
Outdated
exclude: | ||
- python-version: "3.7" | ||
os: "macos-latest" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just leave this out for now -- I'd rather merge this with a broken CI (or wait a little longer for GHA to fix it) than have a matrix exclude rule that I'll likely forget about 🙂
Thanks @cclauss! Please hold off on the CI changes for a bit -- I think what we'll want there is to have a |
I would highly recommend that you step up to |
I understand that people like That isn't to say that they're bad or that Makefiles are good (they aren't!), but I find them simpler to reason about. So I'm inclined to keep this repo in a "minimal" state with just a Makefile until Python's developer tooling circularities get resolved. |
* GitHub Action to spellcheck and lint Python code * Update pyproject.toml Co-authored-by: William Woodruff <[email protected]> * $(VENV)/bin/ruff check --fix * exclude: python-version: "3.7" on os: "macos-latest" * Update tests.yml * Allow Python 3.7 on ARM to crash --------- Co-authored-by: William Woodruff <[email protected]>
This Action uses minimal steps to run in ~5 seconds to rapidly:
codespell
to look for typos in the codebase, andruff
to lint Python code and provide intuitive GitHub Annotations to contributors.Tools:
%
codespell --write-changes
%
ruff check --target-version=py38