Skip to content

Commit aadcce4

Browse files
committed
Update Ruff and pre-commit
1 parent 7a559b9 commit aadcce4

File tree

5 files changed

+6
-9
lines changed

5 files changed

+6
-9
lines changed

.github/workflows/python-package.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,11 @@ defaults:
1717
shell: bash
1818

1919
jobs:
20-
ruff:
20+
pre-commit:
2121
runs-on: ubuntu-latest
2222
steps:
2323
- uses: actions/checkout@v4
24-
- name: Install Ruff
25-
run: pip install ruff
26-
- name: Ruff Check
27-
run: ruff check . --output-format=github
28-
- name: Ruff Format
29-
run: ruff format . --check
24+
- uses: pre-commit/action@v3.0.1
3025

3126
mypy:
3227
runs-on: ubuntu-latest

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ repos:
1717
- id: fix-byte-order-marker
1818
- id: detect-private-key
1919
- repo: https://github.com/astral-sh/ruff-pre-commit
20-
rev: v0.9.10
20+
rev: v0.11.0
2121
hooks:
2222
- id: ruff
2323
args: [--fix, --exit-non-zero-on-fix]

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"scancode",
4646
"setdefault",
4747
"setuptools",
48+
"stdlib",
4849
"subclassing",
4950
"tcod",
5051
"testpaths",

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ line-length = 120
8989
[tool.ruff.lint] # https://docs.astral.sh/ruff/rules/
9090
select = ["ALL"]
9191
ignore = [
92+
"A005", # stdlib-module-shadowing, workaround VSCode treating all modules as local
9293
"COM", # flake8-commas, handled by formatter
9394
"E501", # line-too-long
9495
"S101", # assert

tcod/ecs/typing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Common type-hints for tcod.ecs.""" # noqa: A005
1+
"""Common type-hints for tcod.ecs."""
22

33
from __future__ import annotations
44

0 commit comments

Comments
 (0)