Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: args issue in __init__ of App class (#3140) #3141

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions reflex/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,10 @@ class App(Base):
# The radix theme for the entire app
theme: Optional[Component] = themes.theme(accent_color="blue")

def __init__(self, *args, **kwargs):
def __init__(self, **kwargs):
"""Initialize the app.

Args:
*args: Args to initialize the app with.
**kwargs: Kwargs to initialize the app with.

Raises:
Expand All @@ -176,7 +175,7 @@ def __init__(self, *args, **kwargs):
raise ValueError(
"`connect_error_component` is deprecated, use `overlay_component` instead"
)
super().__init__(*args, **kwargs)
super().__init__(**kwargs)
base_state_subclasses = BaseState.__subclasses__()

# Special case to allow test cases have multiple subclasses of rx.BaseState.
Expand Down
1 change: 0 additions & 1 deletion reflex/app.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ class App(Base):
background_tasks: Set[asyncio.Task] = set()
def __init__(
self,
*args,
stylesheets: Optional[List[str]] = None,
style: Optional[ComponentStyle] = None,
admin_dash: Optional[AdminDash] = None,
Expand Down
Loading