move the filterwarning to appropriate file (#3952)

This commit is contained in:
Thomas Brandého 2024-09-19 02:21:07 +02:00 committed by GitHub
parent 22237658ba
commit c46d1d9c7e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,6 @@ from __future__ import annotations
import copy
import typing
import warnings
from abc import ABC, abstractmethod
from functools import lru_cache, wraps
from hashlib import md5
@ -170,8 +169,6 @@ 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."""

View File

@ -13,6 +13,7 @@ import random
import re
import string
import sys
import warnings
from types import CodeType, FunctionType
from typing import (
TYPE_CHECKING,
@ -72,6 +73,8 @@ if TYPE_CHECKING:
VAR_TYPE = TypeVar("VAR_TYPE", covariant=True)
warnings.filterwarnings("ignore", message="fields may not start with an underscore")
@dataclasses.dataclass(
eq=False,