fix: correct tooling config mismatches and add CI lint workflow#22
Open
KuaaMU wants to merge 1 commit into
Open
fix: correct tooling config mismatches and add CI lint workflow#22KuaaMU wants to merge 1 commit into
KuaaMU wants to merge 1 commit into
Conversation
- Fix pyproject.toml target-version from py38 to py310 (code uses match/case) - Fix requires-python from >=3.8 to >=3.10 (match/case requires 3.10+) - Add .flake8 config with max-line-length=100 to match black - Run black/isort to fix existing formatting violations - Add .github/workflows/lint.yml for CI lint checks - Add .gitignore for .venv/ and __pycache__/ The project had black/isort/flake8 configured in pyproject.toml but: 1. black could not parse files due to py38 target with match/case syntax 2. flake8 defaulted to 79-char lines while black uses 100 3. No CI to enforce these checks This PR makes the existing quality tools actually work and adds CI to enforce them on every push/PR.
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
This PR fixes the code quality tooling configuration mismatches and adds a CI workflow to enforce linting on every push/PR.
Problems Found
The project configured
black,isort, andflake8inpyproject.toml, but the tools were broken:target-version = ['py38']but code usesmatch/case(Python 3.10+)Changes
Configuration Fixes
pyproject.toml:target-versionpy38 → py310,requires-python>=3.8 → >=3.10.flake8: Add config withmax-line-length = 100to match blackpyproject.toml: Remove Python 3.8/3.9 classifiers (match/case requires 3.10+)Code Formatting
blackandisorton all Python files to fix existing violationsCI
.github/workflows/lint.ymlthat runs black, isort, and flake8 checksHousekeeping
.gitignorefor .venv/ and pycache/Verification
All linters pass locally:
Notes