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

This commit is contained in:
Ihor 2024-04-23 01:43:16 +03:00 committed by GitHub
parent 0a1ff38920
commit 415ce5557c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 4 deletions

View File

@ -160,11 +160,10 @@ class App(Base):
# The radix theme for the entire app # The radix theme for the entire app
theme: Optional[Component] = themes.theme(accent_color="blue") theme: Optional[Component] = themes.theme(accent_color="blue")
def __init__(self, *args, **kwargs): def __init__(self, **kwargs):
"""Initialize the app. """Initialize the app.
Args: Args:
*args: Args to initialize the app with.
**kwargs: Kwargs to initialize the app with. **kwargs: Kwargs to initialize the app with.
Raises: Raises:
@ -176,7 +175,7 @@ class App(Base):
raise ValueError( raise ValueError(
"`connect_error_component` is deprecated, use `overlay_component` instead" "`connect_error_component` is deprecated, use `overlay_component` instead"
) )
super().__init__(*args, **kwargs) super().__init__(**kwargs)
base_state_subclasses = BaseState.__subclasses__() base_state_subclasses = BaseState.__subclasses__()
# Special case to allow test cases have multiple subclasses of rx.BaseState. # Special case to allow test cases have multiple subclasses of rx.BaseState.

View File

@ -86,7 +86,6 @@ class App(Base):
background_tasks: Set[asyncio.Task] = set() background_tasks: Set[asyncio.Task] = set()
def __init__( def __init__(
self, self,
*args,
stylesheets: Optional[List[str]] = None, stylesheets: Optional[List[str]] = None,
style: Optional[ComponentStyle] = None, style: Optional[ComponentStyle] = None,
admin_dash: Optional[AdminDash] = None, admin_dash: Optional[AdminDash] = None,