Skip to content

Commit 3e02e28

Browse files
committed
Clean up warnings in scripts
1 parent 153ce40 commit 3e02e28

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

scripts/generate_charmap_table.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
import tcod.tileset
1515

1616

17-
def get_charmaps() -> Iterator[str]:
18-
"""Return an iterator of the current character maps from tcod.tilest."""
17+
def get_character_maps() -> Iterator[str]:
18+
"""Return an iterator of the current character maps from tcod.tileset."""
1919
for name in dir(tcod.tileset):
2020
if name.startswith("CHARMAP_"):
2121
yield name[len("CHARMAP_") :].lower()
@@ -60,7 +60,7 @@ def main() -> None:
6060
parser.add_argument(
6161
"charmap",
6262
action="store",
63-
choices=list(get_charmaps()),
63+
choices=list(get_character_maps()),
6464
type=str,
6565
help="which character map to generate a table from",
6666
)

scripts/tag_release.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,9 @@ def parse_changelog(args: argparse.Namespace) -> tuple[str, str]:
3434
)
3535
assert match
3636
header, changes, tail = match.groups()
37-
tagged = "\n## [{}] - {}\n{}".format(
38-
args.tag,
39-
datetime.date.today().isoformat(), # Local timezone is fine, probably. # noqa: DTZ011
40-
changes,
41-
)
37+
38+
iso_date = datetime.datetime.now(tz=datetime.timezone.utc).date().isoformat()
39+
tagged = f"\n## [{args.tag}] - {iso_date}\n{changes}"
4240
if args.verbose:
4341
print("--- Tagged section:")
4442
print(tagged)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def check_sdl_version() -> None:
3939
return
4040
needed_version = "{}.{}.{}".format(*SDL_VERSION_NEEDED)
4141
try:
42-
sdl_version_str = subprocess.check_output(["sdl2-config", "--version"], universal_newlines=True).strip()
42+
sdl_version_str = subprocess.check_output(["sdl2-config", "--version"], universal_newlines=True).strip() # noqa: S603, S607
4343
except FileNotFoundError as exc:
4444
msg = (
4545
f"libsdl2-dev or equivalent must be installed on your system and must be at least version {needed_version}."

0 commit comments

Comments
 (0)