We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a2b3fc commit e7b448bCopy full SHA for e7b448b
src/libtmux/_internal/dataclasses.py
@@ -5,8 +5,12 @@
5
This is an internal API not covered by versioning policy.
6
"""
7
import dataclasses
8
+import typing as t
9
from operator import attrgetter
10
11
+if t.TYPE_CHECKING:
12
+ from _typeshed import DataclassInstance
13
+
14
15
class SkipDefaultFieldsReprMixin:
16
r"""Skip default fields in :func:`~dataclasses.dataclass`
@@ -72,7 +76,7 @@ class SkipDefaultFieldsReprMixin:
72
76
ItemWithMixin(name=Test, unit_price=2.05)
73
77
74
78
75
- def __repr__(self) -> str:
79
+ def __repr__(self: "DataclassInstance") -> str:
80
"""Omit default fields in object representation."""
81
nodef_f_vals = (
82
(f.name, attrgetter(f.name)(self))
0 commit comments