Skip to content

Commit 63862f9

Browse files
committed
Enable Ruff auto-fixes.
1 parent b637537 commit 63862f9

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
],
66
"editor.formatOnSave": true,
77
"editor.codeActionsOnSave": {
8-
"source.organizeImports": true
8+
"source.fixAll": true,
9+
"source.organizeImports": false
910
},
1011
"files.trimFinalNewlines": true,
1112
"files.insertFinalNewline": true,

docs/conf.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
#
31
# tdl documentation build configuration file, created by
42
# sphinx-quickstart on Fri Nov 25 12:49:46 2016.
53
#
@@ -68,9 +66,7 @@
6866
# built documents.
6967
#
7068
# The full version, including alpha/beta/rc tags.
71-
git_describe = subprocess.run(
72-
["git", "describe", "--abbrev=0"], stdout=subprocess.PIPE, universal_newlines=True, check=True
73-
)
69+
git_describe = subprocess.run(["git", "describe", "--abbrev=0"], stdout=subprocess.PIPE, text=True, check=True)
7470
release = git_describe.stdout.strip()
7571
assert release
7672
print("release version: %r" % release)

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ ignore = [
188188
"D408", # section-underline-after-name
189189
"D409", # section-underline-matches-section-length
190190
]
191+
extend-exclude = ["libtcod"] # Ignore submodule
191192
line-length = 120
192193

193194
[tool.ruff.pydocstyle]

tcod/sdl/audio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def _get_format(format: DTypeLike) -> int:
6565
assert dt.fields is None
6666
bitsize = dt.itemsize * 8
6767
assert 0 < bitsize <= lib.SDL_AUDIO_MASK_BITSIZE
68-
if not dt.str[1] in "uif":
68+
if dt.str[1] not in "uif":
6969
msg = f"Unexpected dtype: {dt}"
7070
raise TypeError(msg)
7171
is_signed = dt.str[1] != "u"

0 commit comments

Comments
 (0)