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

CI: Add ruff #208

Merged
merged 1 commit into from
Nov 3, 2023
Merged

CI: Add ruff #208

merged 1 commit into from
Nov 3, 2023

Conversation

ax3l
Copy link
Member

@ax3l ax3l commented Oct 18, 2023

This adds ruff for Python code linting in pre-commits.

This is performed via flake8 --select=F, skipping all other stylistic checks of flake8 (which we perform with other tools such as black and isort). Also, flake8 supports ... # noqa annotations to silence warnings from pyflakes.

github-advanced-security[bot]

This comment was marked as outdated.

@ax3l ax3l changed the title CI: Add pyflakes CI: Add ruff Oct 19, 2023
tests/test_periodicity.py Outdated Show resolved Hide resolved
@ax3l ax3l mentioned this pull request Oct 19, 2023
This adds `ruff`, a modern version of `pyflakes`, for code linting
in pre-commits.
@@ -132,7 +132,7 @@
gm = geometry
bx = gm.Domain()

for non_periodic_coord in [0, 1]:
for _non_periodic_coord in [0, 1]:

Check failure

Code scanning / CodeQL

Suspicious unused loop iteration variable Error test

For loop variable '_non_periodic_coord' is not used in the loop body.
@ax3l ax3l closed this Nov 1, 2023
@ax3l ax3l reopened this Nov 1, 2023
@ax3l ax3l merged commit ba18b0f into AMReX-Codes:development Nov 3, 2023
48 of 49 checks passed
@ax3l ax3l deleted the ci-pyflakes branch November 3, 2023 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant