added __post_init__ with a validator to a dataclass.
context: this project doesn't use SQLAlchemy.
It looks nice.
added __post_init__ with a validator to a dataclass.
context: this project doesn't use SQLAlchemy.
It looks nice.
@veer66 Dataclasses are sweet. I fell a bit too much in love with them a few years ago, but now I think I've found a good balance. 😅
Have you looked at going to the next level with Pydantic?
@clacke I've used varied versions of Pydantic for 7 months already. I appreciate the Pydantic team for creating declarative specs and validators via classes, which people are already familiar with. However, I prefer typed dicts or data classes.
GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.
All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.