Enable a few more ruff rules

This commit is contained in:
Dunedan 2025-02-26 18:56:02 +01:00
parent 3c57fdb4a9
commit 118ea18a58
No known key found for this signature in database
GPG key ID: 885B16854284E0B2
3 changed files with 3 additions and 7 deletions

View file

@ -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",

View file

@ -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]:

View file

@ -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):