nucleic / atom

Memory efficient Python objects
https://atom.readthedocs.io/en/latest/
Other
361 stars 50 forks source link

Support __init_subclass__ #195

Closed MatthieuDartiailh closed 1 year ago

MatthieuDartiailh commented 1 year ago

Previously AtomMeta created the class too early for this to be of any value. Using __init_subclass__ can be quite useful to customize member in an automated manner as illustrated in the new example.

@frmdstryr this may be of interest to you.

codecov-commenter commented 1 year ago

Codecov Report

Merging #195 (24e89ce) into main (79cfa2f) will increase coverage by 0.04%. The diff coverage is 97.95%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #195 +/- ## ========================================== + Coverage 89.45% 89.50% +0.04% ========================================== Files 56 60 +4 Lines 5360 5413 +53 Branches 344 343 -1 ========================================== + Hits 4795 4845 +50 - Misses 551 552 +1 - Partials 14 16 +2 ```
MatthieuDartiailh commented 1 year ago

I will merge by the end of the week. @frmdstryr I am still curious about your view on this since I believe it can be relevant for some of your use cases.

frmdstryr commented 1 year ago

Looks fine to me