Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ extra_checks = true
enable_error_code = [
"exhaustive-match",
"ignore-without-code",
"mutable-override",
"redundant-expr",
"truthy-bool",
"truthy-iterable",
Expand Down
8 changes: 4 additions & 4 deletions tenacity/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ class BaseAction:
- NAME: for identification in retry object methods and callbacks
"""

REPR_FIELDS: t.Sequence[str] = ()
NAME: str | None = None
REPR_FIELDS: t.ClassVar[t.Sequence[str]] = ()
NAME: t.ClassVar[str | None] = None

def __repr__(self) -> str:
state_str = ", ".join(
Expand All @@ -167,8 +167,8 @@ def __str__(self) -> str:


class RetryAction(BaseAction):
REPR_FIELDS = ("sleep",)
NAME = "retry"
REPR_FIELDS: t.ClassVar[t.Sequence[str]] = ("sleep",)
NAME: t.ClassVar[str | None] = "retry"

def __init__(self, sleep: t.SupportsFloat) -> None:
self.sleep = float(sleep)
Expand Down
Loading