Skip to content

Commit f2e03d0

Browse files
committed
Update pre-commit
Apply new Ruff fixes of unused ignores
1 parent 03fbcaa commit f2e03d0

15 files changed

+3
-26
lines changed

.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.11.13
20+
rev: v0.12.0
2121
hooks:
2222
- id: ruff-check
2323
args: [--fix-only, --exit-non-zero-on-fix]

build_sdl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import requests
2121

2222
# This script calls a lot of programs.
23-
# ruff: noqa: S603, S607, T201
23+
# ruff: noqa: S603, S607
2424

2525
# Ignore f-strings in logging, these will eventually be replaced with t-strings.
2626
# ruff: noqa: G004

examples/samples_tcod.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
if TYPE_CHECKING:
3838
from numpy.typing import NDArray
3939

40-
# ruff: noqa: S311
4140

4241
if not sys.warnoptions:
4342
warnings.simplefilter("default") # Show all warnings.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def check_sdl_version() -> None:
4949
).strip()
5050
except FileNotFoundError:
5151
try:
52-
sdl_version_str = subprocess.check_output(["sdl3-config", "--version"], universal_newlines=True).strip() # noqa: S603, S607
52+
sdl_version_str = subprocess.check_output(["sdl3-config", "--version"], universal_newlines=True).strip() # noqa: S607
5353
except FileNotFoundError as exc:
5454
msg = (
5555
f"libsdl3-dev or equivalent must be installed on your system and must be at least version {needed_version}."

tests/conftest.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
import tcod
1212
from tcod import libtcodpy
1313

14-
# ruff: noqa: D103
15-
1614

1715
def pytest_addoption(parser: pytest.Parser) -> None:
1816
parser.addoption("--no-window", action="store_true", help="Skip tests which need a rendering context.")

tests/test_console.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
import tcod
1010
import tcod.console
1111

12-
# ruff: noqa: D103
13-
1412

1513
def test_array_read_write() -> None:
1614
console = tcod.console.Console(width=12, height=10)

tests/test_deprecated.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
with pytest.warns():
1515
import libtcodpy
1616

17-
# ruff: noqa: D103
18-
1917

2018
def test_deprecate_color() -> None:
2119
with pytest.warns(FutureWarning, match=r"\(0, 0, 0\)"):

tests/test_libtcodpy.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
import tcod
1212
from tcod import libtcodpy
1313

14-
# ruff: noqa: D103
15-
1614
pytestmark = [
1715
pytest.mark.filterwarnings("ignore::DeprecationWarning"),
1816
pytest.mark.filterwarnings("ignore::PendingDeprecationWarning"),

tests/test_noise.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
import tcod.noise
1010
import tcod.random
1111

12-
# ruff: noqa: D103
13-
1412

1513
@pytest.mark.parametrize("implementation", tcod.noise.Implementation)
1614
@pytest.mark.parametrize("algorithm", tcod.noise.Algorithm)

tests/test_parser.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77

88
import tcod as libtcod
99

10-
# ruff: noqa: D103
11-
1210

1311
@pytest.mark.filterwarnings("ignore")
1412
def test_parser() -> None:

0 commit comments

Comments
 (0)