Skip to content

Commit

Permalink
fix: add pylint disable.
Browse files Browse the repository at this point in the history
Signed-off-by: yassun7010 <yassun7010@outlook.com>
  • Loading branch information
yassun7010 committed Nov 1, 2024
1 parent 4a74ac5 commit 9a294d9
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions pandera/dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ class DataType(ABC):

def __init__(self):
if self.__class__ is DataType:
raise TypeError(
f"{self.__class__.__name__} may not be instantiated."
)
raise TypeError(f"{self.__class__.__name__} may not be instantiated.")

def coerce(self, data_container: Any):
"""Coerce data container to the data type."""
Expand Down Expand Up @@ -93,13 +91,14 @@ def __hash__(self) -> int:

@overload
def immutable(
pandera_dtype_cls: _DataTypeClass, **dataclass_kwargs: Any
pandera_dtype_cls: _DataTypeClass, # pylint: disable=W0613
**dataclass_kwargs: Any, # pylint: disable=W0613
) -> _DataTypeClass: ...


@overload
def immutable(
pandera_dtype_cls: None = None, **dataclass_kwargs: Any
**dataclass_kwargs: Any, # pylint: disable=W0613
) -> Callable[[_DataTypeClass], _DataTypeClass]: ...


Expand Down Expand Up @@ -163,9 +162,7 @@ def check(
class _PhysicalNumber(_Number):
bit_width: Optional[int] = None
"""Number of bits used by the machine representation."""
_base_name: Optional[str] = dataclasses.field(
default=None, init=False, repr=False
)
_base_name: Optional[str] = dataclasses.field(default=None, init=False, repr=False)

def __eq__(self, obj: object) -> bool:
if isinstance(obj, type(self)):
Expand Down Expand Up @@ -444,9 +441,7 @@ def __init__(
):
super().__init__()
if precision <= 0:
raise ValueError(
f"Decimal precision {precision} must be positive."
)
raise ValueError(f"Decimal precision {precision} must be positive.")
if scale is not None and scale > precision:
raise ValueError(
f"Decimal scale {scale} must be between 0 and {precision}."
Expand Down

0 comments on commit 9a294d9

Please sign in to comment.