Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix python files detection in format and lint scripts #501

Merged
merged 2 commits into from
Dec 4, 2024

Conversation

potsrevennil
Copy link
Contributor

@potsrevennil potsrevennil commented Dec 4, 2024

Summary:
This PR updates the black Python formatter configuration to correctly detect and format all Python files. Initially, --include scripts/tests was used, which only targeted the scripts/tests file. As more .py files were added, this setup no longer covered the entire project. The regex has been updated to include all .py files, ensuring proper formatting for all Python scripts while preserving the default file detection pattern.

Performed local tests:

  • lint passing
  • tests all passing
  • tests bench passing
  • tests cbmc passing

Do you expect this change to impact performance: Yes/No

If yes, please provide local benchmarking results.

@potsrevennil potsrevennil marked this pull request as ready for review December 4, 2024 08:11
@potsrevennil potsrevennil requested a review from a team as a code owner December 4, 2024 08:11
Initially, the --include scripts/tests option was used with the Python formatter black
because scripts/tests was the only Python script. However, this flag overrides the
default file detection pattern, meaning only scripts/tests was being formatted.

As more .py files have been added, this setup became insufficient.
This commit updates the regex to include both scripts/tests and all .py files,
ensuring proper detection and formatting of all Python scripts in the repository.

Signed-off-by: Thing-han, Lim <[email protected]>
Signed-off-by: Thing-han, Lim <[email protected]>
@mkannwischer mkannwischer merged commit 839c588 into main Dec 4, 2024
41 checks passed
@mkannwischer mkannwischer deleted the fix-py-lint branch December 4, 2024 08:29
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.

2 participants