Skip to content

Commit 9556a35

Browse files
authored
only deprecate base at subclass (#5863)
* only deprecate base at subclass * what
1 parent 4afff3b commit 9556a35

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

reflex/base.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,8 @@ class Config:
2424
use_enum_values = True
2525
extra = "allow"
2626

27-
def __init__(self, *args, **kwargs):
28-
"""Initialize the base class.
29-
30-
Args:
31-
*args: Positional arguments.
32-
**kwargs: Keyword arguments.
33-
"""
27+
def __init_subclass__(cls):
28+
"""Warn that rx.Base is deprecated."""
3429
from reflex.utils import console
3530

3631
console.deprecate(
@@ -39,7 +34,7 @@ def __init__(self, *args, **kwargs):
3934
deprecation_version="0.8.15",
4035
removal_version="0.9.0",
4136
)
42-
super().__init__(*args, **kwargs)
37+
super().__init_subclass__()
4338

4439
def json(self) -> str:
4540
"""Convert the object to a json string.

0 commit comments

Comments
 (0)