Consolidate flake8 configuration into pyproject.toml#9957
Open
p-r-a-v-i-n wants to merge 1 commit intoencode:mainfrom
Open
Consolidate flake8 configuration into pyproject.toml#9957p-r-a-v-i-n wants to merge 1 commit intoencode:mainfrom
p-r-a-v-i-n wants to merge 1 commit intoencode:mainfrom
Conversation
p-r-a-v-i-n
commented
Apr 15, 2026
| hooks: | ||
| - id: flake8 | ||
| additional_dependencies: | ||
| - flake8-pyproject |
Contributor
Author
There was a problem hiding this comment.
i don't know if we are ok with adding this ( flake8-pyproject ) extra dependency in pre-commit which requires here to load flake8 config from pyproject.toml
Contributor
There was a problem hiding this comment.
Pull request overview
This PR centralizes the repository’s Flake8 configuration by moving it from setup.cfg into pyproject.toml, aligning Flake8 with the other tool configurations already managed there.
Changes:
- Removed the legacy
setup.cfgthat only contained Flake8 settings. - Added a
[tool.flake8]section topyproject.tomlwith the prior settings. - Updated the pre-commit Flake8 hook to install
flake8-pyprojectso Flake8 can readpyproject.toml.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| setup.cfg | Removes legacy Flake8-only config file. |
| pyproject.toml | Adds centralized [tool.flake8] configuration. |
| .pre-commit-config.yaml | Ensures pre-commit Flake8 can load config from pyproject.toml via flake8-pyproject. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Currently we configuration for other tools in
pyproject.tomlbut forflak8we are maintaining seperate file.my moving
flake8config inpyproject.tomlkeeps project configuration centralized inpyproject.tomlChanges:
flake8settings fromsetup.cfgto[tool.flake8]inpyproject.tomlflake8hook to includeflake8-pyprojectsetup.cfg