Skip to content

Commit f6f3a10

Browse files
committed
pyright
1 parent 1b6a472 commit f6f3a10

File tree

7 files changed

+18
-21
lines changed

7 files changed

+18
-21
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ repos:
1717
files: ^reflex_ui/
1818

1919
- repo: https://github.com/RobertCraigie/pyright-python
20-
rev: v1.1.401
20+
rev: v1.1.402
2121
hooks:
2222
- id: pyright
2323
files: ^reflex_ui/

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies = [
1111
[dependency-groups]
1212
dev = [
1313
"playwright",
14-
"pyright==1.1.401",
14+
"pyright==1.1.402",
1515
]
1616

1717
[tool.codespell]

reflex_ui/components/base/core_component.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class CoreComponent(Component):
1212
"""Core component for all components."""
1313

1414
# Whether the component should be unstyled
15-
unstyled: Var[bool] = False
15+
unstyled: Var[bool]
1616

1717
@classmethod
1818
def set_class_name(cls, default_class_name: str, props: dict[str, Any]) -> None:

reflex_ui/components/base/twmerge.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
"""Merge Tailwind CSS classes utility."""
22

3+
from reflex.utils.imports import ImportVar
34
from reflex.vars import FunctionVar, Var
4-
from reflex.vars.base import ImportVar, VarData
5+
from reflex.vars.base import VarData
56

67

78
def cn(

reflex_ui/components/button.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
from typing import Literal
44

5-
from reflex.components.component import Component
65
from reflex.components.core.cond import cond
76
from reflex.components.el import Button as BaseButton
87
from reflex.vars import Var
@@ -46,16 +45,16 @@ class Button(BaseButton, CoreComponent):
4645
"""A custom button component."""
4746

4847
# Button variant
49-
variant: Var[LiteralButtonVariant] = "primary"
48+
variant: Var[LiteralButtonVariant]
5049

5150
# Button size
52-
size: Var[LiteralButtonSize] = "md"
51+
size: Var[LiteralButtonSize]
5352

5453
# The loading state of the button
55-
loading: Var[bool] = False
54+
loading: Var[bool]
5655

5756
@classmethod
58-
def create(cls, *children, **props) -> Component:
57+
def create(cls, *children, **props) -> BaseButton:
5958
"""Create the button component."""
6059
variant = props.pop("variant", "primary")
6160
cls.validate_variant(variant)

reflex_ui/components/icons/hugeicon.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,22 @@ class HugeIcon(CoreComponent):
1212

1313
library = "@hugeicons/react@^1.0.5"
1414

15-
tag: str = "HugeiconsIcon"
15+
tag = "HugeiconsIcon"
1616

1717
# The main icon to display
1818
icon: Var[str]
1919

2020
# Alternative icon for states/interactions
21-
alt_icon: Var[str | None] = None
21+
alt_icon: Var[str | None]
2222

2323
# Whether to show the alternative icon
24-
show_alt: Var[bool] = False
24+
show_alt: Var[bool]
2525

2626
# The size of the icon in pixels
27-
size: Var[int] = 16
28-
29-
# The color of the icon
30-
color: Var[str] = "currentColor"
27+
size: Var[int] = Var.create(16)
3128

3229
# The stroke width of the icon
33-
stroke_width: Var[float] = 2
30+
stroke_width: Var[float] = Var.create(2)
3431

3532
@classmethod
3633
def create(cls, *children, **props) -> Component:

uv.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)