Skip to content

Commit

Permalink
move the filterwarning to appropriate file (#3952)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lendemor authored and masenf committed Sep 20, 2024
1 parent ddb189a commit 12982f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 0 additions & 3 deletions reflex/components/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import copy
import typing
import warnings
from abc import ABC, abstractmethod
from functools import lru_cache, wraps
from hashlib import md5
Expand Down Expand Up @@ -170,8 +169,6 @@ def evaluate_style_namespaces(style: ComponentStyle) -> dict:
]
ComponentChild = Union[types.PrimitiveType, Var, BaseComponent]

warnings.filterwarnings("ignore", message="fields may not start with an underscore")


class Component(BaseComponent, ABC):
"""A component with style, event trigger and other props."""
Expand Down
3 changes: 3 additions & 0 deletions reflex/vars/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import re
import string
import sys
import warnings
from types import CodeType, FunctionType
from typing import (
TYPE_CHECKING,
Expand Down Expand Up @@ -72,6 +73,8 @@

VAR_TYPE = TypeVar("VAR_TYPE", covariant=True)

warnings.filterwarnings("ignore", message="fields may not start with an underscore")


@dataclasses.dataclass(
eq=False,
Expand Down

0 comments on commit 12982f5

Please sign in to comment.