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/cd: update workflows, ruff rules and pre-commit hooks #418

Merged
merged 7 commits into from
Jan 3, 2025

Conversation

NTFSvolume
Copy link
Collaborator

@NTFSvolume NTFSvolume commented Jan 1, 2025

1. Add new pre-commits

General purpose

  • toml-sort
  • check-merge-conflict
  • name-tests-test
  • check-illegal-windows-names
  • check-case-conflict

These are for release scripts

  • check-executables-have-shebangs
  • check-shebang-scripts-are-executable
  • check-added-large-files

2. Add new ruff rules

New:

  • ASYNC # async calls that do not await anything or use blocking methods (link)
  • FA102 # future annotations (link)
  • PTH # use pathlib instead of os (link)
  • T20 # flake8-print (link)
  • TID # flake8-tidy-imports (link)

Changed

  • Replace TCH with TC (new name for type checking imports) and add it as a safe fix
  • Marked ERA (commented out code) as unfixable

Ignore:

  • Ignore E402 on __init__.py files, tests and docs folders
  • Ignore T20 on tests and docs folders

3. Update ruff action to v3


Note

The ruff check on this PR may fail cause of the new rules. I will make a PR with the fixes after this PR is merged (if required)

General propose:
- `check-merge-conflict`
- `name-tests-test`
- `check-illegal-windows-names`

These are for the release scripts:
- `check-executables-have-shebangs`
- `check-shebang-scripts-are-executable`
- `check-added-large-files`
- `check-case-conflict`
New rules:
-  `ASYNC` # async calls that do not await anything or use blocking methods
- `FA100`  # future annotations
- `PTH`  # use pathlib instead of os
- `T20`  # flake8-print
- `TID`  # flake8-tidy-imports

Change rules
- Replace `TCH` with `TC` (new name for type checking imports) and add it as a safe fix
- Marked `ERA` (commented out code) as unfixable

Ignore:
- Ignore `E402` on `__init__.py` files and `tests` and `docs` folders
This is auto-fixable
@NTFSvolume NTFSvolume added chore dependencies or versions bumps ci/cd building, testing, and deployment labels Jan 1, 2025
@NTFSvolume NTFSvolume requested a review from jbsparrow January 1, 2025 20:04
@NTFSvolume NTFSvolume merged commit 30a03db into jbsparrow:master Jan 3, 2025
3 checks passed
@NTFSvolume NTFSvolume deleted the update_ci branch January 3, 2025 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore dependencies or versions bumps ci/cd building, testing, and deployment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants