From eafd02bb53cc102e04a3a72b50f63edd5bd42b59 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Wed, 14 Feb 2024 10:35:57 -0500 Subject: [PATCH] feat(workflow): switch to ruff for code linting --- .forgejo/workflows/workflow.yaml | 6 +++--- aurora/utilities/utils.py | 2 +- pyproject.toml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.forgejo/workflows/workflow.yaml b/.forgejo/workflows/workflow.yaml index 8370dfb..e17db0f 100644 --- a/.forgejo/workflows/workflow.yaml +++ b/.forgejo/workflows/workflow.yaml @@ -6,7 +6,7 @@ on: pull_request: jobs: - Lint Code (Pylint): + Lint Code (Ruff): runs-on: docker container: coastalcommits.com/seaswimmerthefsh/actionscontainers-seacogs:latest steps: @@ -16,8 +16,8 @@ jobs: - name: Install dependencies run: poetry install --with dev --no-root - - name: Analysing code with Pylint - run: pylint --rcfile .forgejo/workflows/config/.pylintrc $(git ls-files '*.py') + - name: Analysing code with Ruff + run: ruff check $(git ls-files '*.py') Build Documentation (MkDocs): runs-on: docker diff --git a/aurora/utilities/utils.py b/aurora/utilities/utils.py index 33b3b4c..2e5174c 100644 --- a/aurora/utilities/utils.py +++ b/aurora/utilities/utils.py @@ -33,7 +33,7 @@ def check_permissions( for permission in permissions: if ( not getattr(resolved_permissions, permission, False) - and not resolved_permissions.administrator is True + and resolved_permissions.administrator is not True ): return permission diff --git a/pyproject.toml b/pyproject.toml index 3ac495a..7ca589f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ humanize = "^4.8.0" optional = true [tool.poetry.group.dev.dependencies] -pylint = "^2.17.5" +ruff = "0.2.0" [tool.poetry.group.docs] optional = true