mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 05:13:58 -07:00
Enable a few more ruff rules
This commit is contained in:
parent
3c57fdb4a9
commit
118ea18a58
3 changed files with 3 additions and 7 deletions
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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]:
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue