Skip to content

Chore/lint implementation#49

Merged
emidiovaleretto merged 2 commits into
mainfrom
chore/lint-implementation
Jun 14, 2026
Merged

Chore/lint implementation#49
emidiovaleretto merged 2 commits into
mainfrom
chore/lint-implementation

Conversation

@emidiovaleretto

Copy link
Copy Markdown
Owner

Context

Code formatting issues (whitespace, trailing spaces) were slipping into commits
and only getting caught by flake8 in CI — causing avoidable failed pipelines and
follow-up "style: fix" commits.

What

  • Add black (code formatter) and pre-commit to development.txt
  • Add .pre-commit-config.yaml running black and flake8 as commit hooks
  • Add [tool.black] config in pyproject.toml with line-length 120
  • Format the existing codebase with black (separate commit)

Why

With pre-commit installed, black and flake8 run automatically before every
commit. Formatting issues are fixed (or blocked) locally, so they never reach
CI. Black's line-length is aligned to 120 to match the existing flake8 config,
keeping both tools consistent.

How it works

  • pre-commit hooks run on git commit: black formats, then flake8 verifies
  • Black config lives in pyproject.toml; flake8 reads the existing .flake8
  • Developers run pre-commit install once after cloning to activate the hooks

How to verify

Make a formatting error (e.g. trailing whitespace), stage it, and commit —
black fixes it and the commit is blocked until re-staged. Tested locally:
hooks fire correctly, black reformats, flake8 passes.

@emidiovaleretto emidiovaleretto self-assigned this Jun 14, 2026
@emidiovaleretto emidiovaleretto merged commit c7b432e into main Jun 14, 2026
2 checks passed
@emidiovaleretto emidiovaleretto deleted the chore/lint-implementation branch June 14, 2026 17:55
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