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

Add linting config and fix linting issues #146

Merged
merged 3 commits into from
Aug 27, 2024
Merged

Add linting config and fix linting issues #146

merged 3 commits into from
Aug 27, 2024

Conversation

stefsmeets
Copy link
Contributor

@stefsmeets stefsmeets commented Aug 26, 2024

This PR summarizes the changes made to master directly by accident last week:

I added a linting config, which will help catch a bunch of issues. See https://docs.astral.sh/ruff/rules/#pyflakes-f and https://docs.astral.sh/ruff/rules/#pycodestyle-e-w for more info.

I addressed many of the issues in the commits linked above.

In addition, in this PR I made the final changes to get the linter to be happy.

These changes address #131

TODO:

  • Fix: Unexpected input(s) 'changed-files', valid inputs are ['args', 'src', 'version']

@stefsmeets stefsmeets marked this pull request as ready for review August 26, 2024 08:38
@stefsmeets
Copy link
Contributor Author

@nichollsh Let me know what you think. If you are unhappy with any of the changes made to master, I can fix roll them back or fix them in this PR.

@nichollsh
Copy link
Contributor

These changes look good! Is there a way to enforce a maximum line length of our choosing, rather than disabling the check entirely?

@stefsmeets
Copy link
Contributor Author

Yeah, with ruff --format, but this will introduce a LOT of changes that I want to avoid in this PR.

@stefsmeets stefsmeets mentioned this pull request Aug 26, 2024
@stefsmeets
Copy link
Contributor Author

stefsmeets commented Aug 26, 2024

The ruff action has some issues with the config and does not seem well maintained. Might be worth to just run pre-commit directly, something like:

      - name: Run Pre-Commit
        uses: pre-commit/action@v3.0.0
        with:
          extra_args: --files $CHANGED_FILES

Using: https://github.com/marketplace/actions/changed-files

@stefsmeets stefsmeets requested a review from nichollsh August 26, 2024 11:30
@stefsmeets
Copy link
Contributor Author

stefsmeets commented Aug 26, 2024

@nichollsh I think this PR is ready to be merged!

@stefsmeets stefsmeets mentioned this pull request Aug 27, 2024
4 tasks
@stefsmeets stefsmeets merged commit 768749c into master Aug 27, 2024
2 checks passed
@stefsmeets stefsmeets deleted the lint-fix branch August 27, 2024 15:19
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