Message316343
The init method that comes up for int, str, float, etc is just the object init:
assert int.__init__ is object.__init__
Probably the thing to do is grab any init methods that aren't the object.__init__ while stripping out the dataclass-created init methods? Maybe something like:
import warnings
if cls.__dataclass_params__.init:
for pcls in cls.mro():
if pcls.__init__ is not object.__init__:
try:
d_params = getattr(pcls, "__dataclass_params__")
except AttributeError:
warnings.warn('Found a not called init')
else:
if not d_params.init:
warnings.warn('Found a custom dataclass init') |
|
Date |
User |
Action |
Args |
2018-05-10 02:27:36 | Ricyteach | set | recipients:
+ Ricyteach, eric.smith |
2018-05-10 02:27:36 | Ricyteach | set | messageid: <1525919256.17.0.682650639539.issue33452@psf.upfronthosting.co.za> |
2018-05-10 02:27:36 | Ricyteach | link | issue33452 messages |
2018-05-10 02:27:35 | Ricyteach | create | |
|