Skip to content
This repository was archived by the owner on Jun 25, 2025. It is now read-only.

Conversation

macintacos
Copy link
Contributor

This adds the classd snippet, which creates a class definition using the @dataclass decorator, adds the necessary import statement, and provides a sample property for the user to fill in.

User can remove the import statement (or have their editor do it for them). I'm on the fence about leaving the import statement in, as folks new to Python might define multiple classes within the same file and have multiple import statements, but presumably they'll have a linter setup to save them. Up to you though.

@cstrap cstrap merged commit 1bcff7a into cstrap:master Oct 13, 2021
@cstrap
Copy link
Owner

cstrap commented Oct 13, 2021

Thanks!

@macintacos macintacos deleted the dataclass branch October 15, 2021 05:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants