forked from blizzthewolf/SeaCogs
feat(workflow): switch to ruff for code linting
This commit is contained in:
parent
1aa12e88ac
commit
eafd02bb53
3 changed files with 5 additions and 5 deletions
|
@ -6,7 +6,7 @@ on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Lint Code (Pylint):
|
Lint Code (Ruff):
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
container: coastalcommits.com/seaswimmerthefsh/actionscontainers-seacogs:latest
|
container: coastalcommits.com/seaswimmerthefsh/actionscontainers-seacogs:latest
|
||||||
steps:
|
steps:
|
||||||
|
@ -16,8 +16,8 @@ jobs:
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: poetry install --with dev --no-root
|
run: poetry install --with dev --no-root
|
||||||
|
|
||||||
- name: Analysing code with Pylint
|
- name: Analysing code with Ruff
|
||||||
run: pylint --rcfile .forgejo/workflows/config/.pylintrc $(git ls-files '*.py')
|
run: ruff check $(git ls-files '*.py')
|
||||||
|
|
||||||
Build Documentation (MkDocs):
|
Build Documentation (MkDocs):
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
|
|
|
@ -33,7 +33,7 @@ def check_permissions(
|
||||||
for permission in permissions:
|
for permission in permissions:
|
||||||
if (
|
if (
|
||||||
not getattr(resolved_permissions, permission, False)
|
not getattr(resolved_permissions, permission, False)
|
||||||
and not resolved_permissions.administrator is True
|
and resolved_permissions.administrator is not True
|
||||||
):
|
):
|
||||||
return permission
|
return permission
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ humanize = "^4.8.0"
|
||||||
optional = true
|
optional = true
|
||||||
|
|
||||||
[tool.poetry.group.dev.dependencies]
|
[tool.poetry.group.dev.dependencies]
|
||||||
pylint = "^2.17.5"
|
ruff = "0.2.0"
|
||||||
|
|
||||||
[tool.poetry.group.docs]
|
[tool.poetry.group.docs]
|
||||||
optional = true
|
optional = true
|
||||||
|
|
Loading…
Reference in a new issue