From 415ce5557c54d061bcbc9a77f6a16ad0a147922f Mon Sep 17 00:00:00 2001 From: Ihor <31508183+nautics889@users.noreply.github.com> Date: Tue, 23 Apr 2024 01:43:16 +0300 Subject: [PATCH] fix: args issue in __init__ of App class (#3140) (#3141) --- reflex/app.py | 5 ++--- reflex/app.pyi | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index 4b5da0b7d..bd3e7e23a 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -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 @@ class App(Base): 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. diff --git a/reflex/app.pyi b/reflex/app.pyi index 016bccd82..cab598e87 100644 --- a/reflex/app.pyi +++ b/reflex/app.pyi @@ -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,