Skip to content

Commit 5e270c7

Browse files
committed
hatch fmt auto fixes
1 parent 8c9ea0f commit 5e270c7

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

src/reactpy/_console/rewrite_keys.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def log_could_not_rewrite(file: Path, tree: ast.AST) -> None:
102102

103103
if (
104104
name == "vdom"
105-
or hasattr(html, name)
106-
and any(kw.arg == "key" for kw in node.keywords)
105+
or (hasattr(html, name)
106+
and any(kw.arg == "key" for kw in node.keywords))
107107
):
108108
click.echo(f"Unable to rewrite usage at {file}:{node.lineno}")

src/reactpy/core/component.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def constructor(*args: Any, key: Any | None = None, **kwargs: Any) -> Component:
3434
class Component:
3535
"""An object for rending component models."""
3636

37-
__slots__ = "__weakref__", "_func", "_args", "_kwargs", "_sig", "key", "type"
37+
__slots__ = "__weakref__", "_args", "_func", "_kwargs", "_sig", "key", "type"
3838

3939
def __init__(
4040
self,

src/reactpy/core/hooks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def use_state(initial_value: _Type | Callable[[], _Type]) -> State[_Type]:
7979

8080

8181
class _CurrentState(Generic[_Type]):
82-
__slots__ = "value", "dispatch"
82+
__slots__ = "dispatch", "value"
8383

8484
def __init__(
8585
self,
@@ -534,7 +534,7 @@ def setup(function: Callable[[], _Type]) -> _Type:
534534
class _Memo(Generic[_Type]):
535535
"""Simple object for storing memoization data"""
536536

537-
__slots__ = "value", "deps"
537+
__slots__ = "deps", "value"
538538

539539
value: _Type
540540
deps: Sequence[Any]

src/reactpy/core/vdom.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,6 @@ def separate_attributes_and_children(
217217

218218
_attributes: VdomAttributes
219219
children_or_iterables: Sequence[Any]
220-
# ruff: noqa: E721
221220
if type(values[0]) is dict:
222221
_attributes, *children_or_iterables = values
223222
else:

src/reactpy/web/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def module_name_suffix(name: str) -> str:
1212
if name.startswith("@"):
1313
name = name[1:]
1414
head, _, tail = name.partition("@") # handle version identifier
15-
version, _, tail = tail.partition("/") # get section after version
15+
_, _, tail = tail.partition("/") # get section after version
1616
return PurePosixPath(tail or head).suffix or ".js"
1717

1818

0 commit comments

Comments
 (0)