Skip to content

Commit

Permalink
fix: args issue in __init__ of App class (reflex-dev#3140)
Browse files Browse the repository at this point in the history
* (fix): remove '*args' from '__init__()' method of 'App', update
  docstrings and .pyi accordingly
  • Loading branch information
nautics889 committed Apr 22, 2024
1 parent 0a1ff38 commit 897b21b
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 2 additions & 3 deletions reflex/app.py
Original file line number Diff line number Diff line change
@@ -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:
@@ -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.
1 change: 0 additions & 1 deletion reflex/app.pyi
Original file line number Diff line number Diff line change
@@ -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,

0 comments on commit 897b21b

Please sign in to comment.