summaryrefslogtreecommitdiffstats
path: root/Lib/dataclasses.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/dataclasses.py')
-rw-r--r--Lib/dataclasses.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/dataclasses.py b/Lib/dataclasses.py
index 9dc67fa..1742900 100644
--- a/Lib/dataclasses.py
+++ b/Lib/dataclasses.py
@@ -1195,7 +1195,7 @@ def fields(class_or_instance):
try:
fields = getattr(class_or_instance, _FIELDS)
except AttributeError:
- raise TypeError('must be called with a dataclass type or instance')
+ raise TypeError('must be called with a dataclass type or instance') from None
# Exclude pseudo-fields. Note that fields is sorted by insertion
# order, so the order of the tuple is as the fields were defined.