Skip to content

Commit 20c439a

Browse files
committed
Re-format with black.
1 parent b494574 commit 20c439a

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

django_unicorn/call_method_parser.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,9 @@ def parse_kwarg(kwarg: str, raise_if_unparseable=False) -> Dict[str, Any]:
131131

132132

133133
@lru_cache(maxsize=128, typed=True)
134-
def parse_call_method_name(call_method_name: str) -> Tuple[str, Tuple[Any], Mapping[str, Any]]:
134+
def parse_call_method_name(
135+
call_method_name: str,
136+
) -> Tuple[str, Tuple[Any], Mapping[str, Any]]:
135137
"""
136138
Parses the method name from the request payload into a set of parameters to pass to a method.
137139

django_unicorn/views/objects.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ def __init__(self, data):
2323
self.partials = data.get("partials", [])
2424

2525
def __repr__(self):
26-
return (f"Action(action_type='{self.action_type}' payload={self.payload}"
27-
f" partials={self.partials})")
26+
return (
27+
f"Action(action_type='{self.action_type}' payload={self.payload}"
28+
f" partials={self.partials})"
29+
)
2830

2931

3032
class ComponentRequest:
@@ -65,8 +67,10 @@ def __init__(self, request, component_name):
6567
self.action_queue.append(Action(action_data))
6668

6769
def __repr__(self):
68-
return (f"ComponentRequest(name='{self.name}' id='{self.id}' key='{self.key}'"
69-
f" epoch={self.epoch} data={self.data} action_queue={self.action_queue})")
70+
return (
71+
f"ComponentRequest(name='{self.name}' id='{self.id}' key='{self.key}'"
72+
f" epoch={self.epoch} data={self.data} action_queue={self.action_queue})"
73+
)
7074

7175
def validate_checksum(self):
7276
"""

tests/call_method_parser/test_parse_call_method_name.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ def test_multiple_args_2():
3939
def test_var_with_curly_braces():
4040
expected = (
4141
"set_name",
42-
(
43-
"{}",
44-
),
42+
("{}",),
4543
{},
4644
)
4745
actual = parse_call_method_name('set_name("{}")')
@@ -52,9 +50,7 @@ def test_var_with_curly_braces():
5250
def test_one_arg():
5351
expected = (
5452
"set_name",
55-
(
56-
"1",
57-
),
53+
("1",),
5854
{},
5955
)
6056
actual = parse_call_method_name('set_name("1")')

0 commit comments

Comments
 (0)