-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduces ruff as linter and formatter (#38)
* Adds ruff and resolves linting errors on standard rule set * Resolves automatically fixable linting errors on advanced rule set * Resolves most manually fixable linting errors on advanced rule set * Switches code to use double quotes * Resolves automatically fixable linting errors on full rule set * Applies ruff formatter * Finalises rule selection and tidies up code * Adds "requirements-dev.txt" * Adds "requirements-dev.txt" * Adds new github action for linter and formatter * Addresses review comments
- Loading branch information
1 parent
a14835e
commit a7842e6
Showing
46 changed files
with
9,475 additions
and
4,484 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Ruff | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
ruff: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: chartboost/ruff-action@v1 | ||
- uses: chartboost/ruff-action@v1 | ||
with: | ||
args: 'format --check' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,3 +28,6 @@ docs/*.inv | |
build/* | ||
dist/* | ||
*.whl | ||
|
||
# Local pre-commit hooks | ||
.pre-commit-config.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
import os | ||
|
||
from RAT import models | ||
from RAT.classlist import ClassList | ||
from RAT.project import Project | ||
from RAT.controls import set_controls | ||
from RAT.project import Project | ||
from RAT.run import run | ||
import RAT.models | ||
|
||
__all__ = ["ClassList", "Project", "run", "set_controls", "models"] | ||
|
||
dir_path = os.path.dirname(os.path.realpath(__file__)) | ||
os.environ["RAT_PATH"] = os.path.join(dir_path, '') | ||
os.environ["RAT_PATH"] = os.path.join(dir_path, "") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.