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
| format: | ||
| $(VENV)/bin/black . | ||
| $(VENV)/bin/codespell | ||
| $(VENV)/bin/ruff check |
There was a problem hiding this comment.
I believe this needs to be ruff check --fix to perform changes, right?
There was a problem hiding this comment.
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 <william@yossarian.net>
.github/workflows/tests.yml
Outdated
| exclude: | ||
| - python-version: "3.7" | ||
| os: "macos-latest" |
There was a problem hiding this comment.
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 <william@yossarian.net> * $(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 <william@yossarian.net>
This Action uses minimal steps to run in ~5 seconds to rapidly:
codespellto look for typos in the codebase, andruffto lint Python code and provide intuitive GitHub Annotations to contributors.Tools:
%
codespell --write-changes%
ruff check --target-version=py38