Move all Python tool configs to pyproject.toml#235
Merged
Conversation
We can configure all our Python tooling in a single pyproject.toml file. Note that using pyproject.toml to configure flake8 requires the addition of the flake8-pyproject Python library.
…mmit hook This will ensure that, even when run as a pre-commit hook, flake8 reads its configuration from the pyproject.toml file.
Also remove .flake8 and .isort.cfg as triggers for the same label.
flake8 and isort configs to pyproject.tomlpyproject.toml
6 tasks
This file was doing nothing due to its contents.
The flake8-docstrings dependency is pinned, so this one should be too.
b5d84c8 to
15cb601
Compare
dav3r
approved these changes
Nov 7, 2025
dav3r
left a comment
Member
There was a problem hiding this comment.
👍 👍 This all makes sense to me.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR consolidates Python tool configurations into pyproject.toml, migrating from separate configuration files (.flake8, .isort.cfg, .bandit.yml) to a centralized TOML-based approach. This modernizes the project's configuration management by leveraging the standard pyproject.toml file.
Key Changes:
- Migrated flake8 configuration to
pyproject.tomlusing theflake8-pyprojectplugin - Consolidated isort configuration into
pyproject.toml - Removed bandit custom configuration file and simplified to use defaults
- Updated GitHub labeler to track
pyproject.tomlinstead of removed config files
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
requirements-test.txt |
Added flake8-pyproject dependency to enable flake8 to read configuration from pyproject.toml |
pyproject.toml |
Migrated flake8 and isort configurations from separate files to TOML format; updated flake8 config to use [tool.flake8] section with array syntax and extend-ignore |
.pre-commit-config.yaml |
Removed bandit config file argument and added flake8-pyproject==1.2.3 dependency to flake8 hook |
.isort.cfg |
Deleted file - configuration moved to pyproject.toml |
.github/labeler.yml |
Updated test-related file tracking to include pyproject.toml and remove deleted config files |
.bandit.yml |
Deleted file - using bandit defaults instead of custom configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
6 tasks
flake8 itself isn't installed here, so this dependency shouldn't be either. This jibes with the fact that we don't install flake8-docstrings (another dependency of the flake8 pre-commit hook) into the virtual environment either.
dav3r
approved these changes
Nov 7, 2025
This was referenced Nov 17, 2025
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.
🗣 Description
This pull request:
flake8andisortconfigurations to apyproject.tomlfile.banditconfigurationSee also cisagov/skeleton-python-library#164.
💭 Motivation and context
banditconfiguration wasn't actually doing anything due to its contents.Resolves #233. Resolves #234.
🧪 Testing
All automated tests pass.
✅ Pre-approval checklist