Skip to content

Commit e7cc0ec

Browse files
committed
make _is_tag_in_global_scope just a classvar
1 parent f5071bf commit e7cc0ec

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

pyi_hashes.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"reflex/components/datadisplay/dataeditor.pyi": "cb03d732e2fe771a8d46c7bcda671f92",
2727
"reflex/components/datadisplay/shiki_code_block.pyi": "87db7639bfa5cd53e1709e1363f93278",
2828
"reflex/components/el/__init__.pyi": "09042a2db5e0637e99b5173430600522",
29-
"reflex/components/el/element.pyi": "6d739982d5d7842892745ef520887bb9",
29+
"reflex/components/el/element.pyi": "ea6b33a8545c2c845dc6c30ff1c872a4",
3030
"reflex/components/el/elements/__init__.pyi": "280ed457675f3720e34b560a3f617739",
3131
"reflex/components/el/elements/base.pyi": "6e533348b5e1a88cf62fbb5a38dbd795",
3232
"reflex/components/el/elements/forms.pyi": "161f1ef847e5da8755528a7977fdcf53",

reflex/components/component.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,7 @@ class Component(BaseComponent, ABC):
269269
alias: str | None = pydantic.v1.Field(default_factory=lambda: None)
270270

271271
# Whether the component is a global scope tag. True for tags like `html`, `head`, `body`.
272-
_is_tag_in_global_scope: bool = pydantic.v1.PrivateAttr(
273-
default_factory=lambda: False
274-
)
272+
_is_tag_in_global_scope: ClassVar[bool] = False
275273

276274
# Whether the import is default or named.
277275
is_default: bool | None = pydantic.v1.Field(default_factory=lambda: False)

reflex/components/el/element.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
"""Base class definition for raw HTML elements."""
22

3-
import pydantic.v1
3+
from typing import ClassVar
44

55
from reflex.components.component import Component
66

77

88
class Element(Component):
99
"""The base class for all raw HTML elements."""
1010

11-
_is_tag_in_global_scope = pydantic.v1.PrivateAttr(default_factory=lambda: True)
11+
_is_tag_in_global_scope: ClassVar[bool] = True
1212

1313
def __eq__(self, other: object):
1414
"""Two elements are equal if they have the same tag.

0 commit comments

Comments
 (0)