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 4eab90f commit 11abe0fCopy full SHA for 11abe0f
Lib/dataclasses.py
@@ -527,7 +527,7 @@ def add_fns_to_class(self, cls):
527
if already_exists and (msg_extra := self.overwrite_errors.get(name)):
528
error_msg = (f'Cannot overwrite attribute {fn.__name__} '
529
f'in class {cls.__name__}')
530
- if not msg_extra is True:
+ if msg_extra is not True:
531
error_msg = f'{error_msg} {msg_extra}'
532
533
raise TypeError(error_msg)
0 commit comments