From 118ea18a58aba25847a63859b123d6322c3b3ffe Mon Sep 17 00:00:00 2001 From: Dunedan Date: Wed, 26 Feb 2025 18:56:02 +0100 Subject: [PATCH] Enable a few more ruff rules --- ruff.toml | 6 +----- source/tools/i18n/check_translations.py | 2 +- source/tools/rlclient/python/zero_ad/api.py | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/ruff.toml b/ruff.toml index 75c69dfa24..96e8770ae6 100644 --- a/ruff.toml +++ b/ruff.toml @@ -35,11 +35,8 @@ ignore = [ "COM812", "D10", "EM", - "FA", - "FIX", + "FIX002", "FBT", - "ISC001", - "N817", "PERF401", "PLR0912", "PLR0915", @@ -48,7 +45,6 @@ ignore = [ "PT", "PTH", "S101", - "S310", "S314", "S320", "S603", diff --git a/source/tools/i18n/check_translations.py b/source/tools/i18n/check_translations.py index 0dda5da15f..83f08262e0 100755 --- a/source/tools/i18n/check_translations.py +++ b/source/tools/i18n/check_translations.py @@ -49,7 +49,7 @@ class URLSpamRule(LintRule): def __init__(self): super().__init__() self.url_regex = re.compile( - r"https?://(?:[a-z0-9-_$@./&+]|(?:%[0-9a-fA-F][" r"0-9a-fA-F]))+", re.IGNORECASE + r"https?://(?:[a-z0-9-_$@./&+]|(?:%[0-9a-fA-F][0-9a-fA-F]))+", re.IGNORECASE ) def lint(self, _: VariableTokenizer, linted_entry: LintedEntry) -> list[LintMessage]: diff --git a/source/tools/rlclient/python/zero_ad/api.py b/source/tools/rlclient/python/zero_ad/api.py index 97e78a2b6b..0da94b5712 100644 --- a/source/tools/rlclient/python/zero_ad/api.py +++ b/source/tools/rlclient/python/zero_ad/api.py @@ -7,7 +7,7 @@ class RLAPI: self.url = url def post(self, route, data): - response = request.urlopen(url=f"{self.url}/{route}", data=bytes(data, "utf8")) + response = request.urlopen(url=f"{self.url}/{route}", data=bytes(data, "utf8")) # noqa: S310 return response.read() def step(self, commands):