Skip to content

Commit af5b088

Browse files
committed
run ruff #21
1 parent 2f2eb8c commit af5b088

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

django_routines/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"""
1515

1616
import bisect
17-
import sys
1817
import keyword
18+
import sys
1919
import typing as t
2020
from abc import ABC, abstractmethod
2121
from dataclasses import asdict, dataclass, field
@@ -51,7 +51,7 @@
5151
Command = t.Union["ManagementCommand", "SystemCommand"]
5252

5353

54-
def to_symbol(name: str, check_keyword: bool=False) -> str:
54+
def to_symbol(name: str, check_keyword: bool = False) -> str:
5555
symbol = name.lstrip("-").replace("-", "_")
5656
if check_keyword and symbol.lower() in keyword.kwlist:
5757
return f"{symbol}_"

django_routines/management/commands/routine.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,9 +281,7 @@ def _list(self) -> None:
281281
)
282282
add_switches = ""
283283
for switch in switches:
284-
add_switches += (
285-
f'\n if all or {to_symbol(switch, check_keyword=True)}: self.switches.append("{switch}")'
286-
)
284+
add_switches += f'\n if all or {to_symbol(switch, check_keyword=True)}: self.switches.append("{switch}")'
287285

288286
cmd_code = COMMAND_TMPL.format(
289287
routine_func=to_symbol(routine.name, check_keyword=True),

tests/test_dataclasses.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,7 @@ def test_settings_format(self):
135135
routines["import"],
136136
Routine(
137137
commands=[
138-
RoutineCommand(
139-
command=("track", "2"), switches=("import", "demo")
140-
),
138+
RoutineCommand(command=("track", "2"), switches=("import", "demo")),
141139
RoutineCommand(
142140
command=("track", "0"),
143141
options={"verbosity": 0},

0 commit comments

Comments
 (0)