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 linting action that uses pre-commit and ruff. #797

Merged
merged 8 commits into from
Feb 13, 2024

Conversation

zssherman
Copy link
Collaborator

@zssherman zssherman commented Feb 1, 2024

No description provided.

@zssherman
Copy link
Collaborator Author

I need to find a way for it to ignore removing the imports in the try and except blocks

@zssherman zssherman closed this Feb 13, 2024
@zssherman zssherman reopened this Feb 13, 2024
@zssherman
Copy link
Collaborator Author

@mgrover1 Is there a way for precommit to fix the 600 or so long line errors? Or do i have to manually go in and fix all 600.... Or is there another way around it?

@mgrover1
Copy link
Collaborator

@zssherman - you can fix these files using ruff, which is part of the pre-commit hooks

See https://docs.astral.sh/ruff/tutorial/#getting-started

You can run

ruff check . --fix

to automatically go in and fix those files

@zssherman
Copy link
Collaborator Author

@mgrover1 Hmm sadly it doesn't do anything at all from the act directory.

@zssherman
Copy link
Collaborator Author

@mgrover1 I think I figured it out, was missing that addition of ruff to the pyproject.yml

@zssherman zssherman merged commit 4e12704 into ARM-DOE:main Feb 13, 2024
17 of 18 checks passed
@zssherman zssherman deleted the precommit_action branch April 23, 2024 15:33
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