reflex/reflex/components/el/element.py
Thomas Brandého b8b3f8910e
add more type annotations through the code (#4401)
* add more type annotations through the code

* add typing in reflex/utils

* misc typing

* more typings

* state typing

* keep typing

* typing init and utils

* more typing for components

* fix attempt for 3.9

* need more __future

* more typings

* type event plz

* type model

* type vars/base.py

* enable 'ANN001' for reflex folder (ignore tests and benchmarks)

* fix pyi

* add missing annotations

* use more precise error when ignoring
2025-01-29 01:12:47 +01:00

19 lines
501 B
Python

"""Base class definition for raw HTML elements."""
from reflex.components.component import Component
class Element(Component):
"""The base class for all raw HTML elements."""
def __eq__(self, other: object):
"""Two elements are equal if they have the same tag.
Args:
other: The other element.
Returns:
True if the elements have the same tag, False otherwise.
"""
return isinstance(other, Element) and self.tag == other.tag