From 4d9c8ff812a3ff13349076c0ad51b2026f827887 Mon Sep 17 00:00:00 2001 From: Nathaniel Starkman Date: Wed, 17 Jul 2024 01:48:35 -0400 Subject: [PATCH] fix: get beartype to pass (#3) Signed-off-by: nstarman --- pyproject.toml | 3 +++ src/dataclasstools/_core.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a590ee7..3645f4e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -118,6 +118,9 @@ ignore = [ "PLR09", # Too many <...> "PLR2004", # Magic value used in comparison "ISC001", # Conflicts with formatter + "TD002", # Missing author in TODO + "TD003", # Missing issue link on the line following this TODO + "FIX002", # Line contains TODO ] [tool.ruff.lint.per-file-ignores] diff --git a/src/dataclasstools/_core.py b/src/dataclasstools/_core.py index c4fef9a..e6edaf4 100644 --- a/src/dataclasstools/_core.py +++ b/src/dataclasstools/_core.py @@ -34,7 +34,7 @@ def replace(obj: DataclassInstance, /, **kwargs: Any) -> DataclassInstance: @dispatch # type: ignore[misc] -def fields(obj: DataclassInstance) -> tuple[_dataclass_Field[Any], ...]: +def fields(obj: DataclassInstance) -> tuple[_dataclass_Field, ...]: # type: ignore[type-arg] # TODO: raise issue in beartype """Return the fields of a dataclass instance.""" return _dataclass_fields(obj)