Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jun 25, 2025. It is now read-only.
/python-snippetsPublic archive

Addclassd snippet for creating a dataclass#15

Merged
cstrap merged 3 commits intocstrap:masterfrommacintacos:dataclass
Oct 13, 2021

Conversation

@macintacos
Copy link
Contributor

This adds theclassd 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.

@cstrapcstrap merged commit1bcff7a intocstrap:masterOct 13, 2021
@cstrap
Copy link
Owner

Thanks!

@macintacosmacintacos deleted the dataclass branchOctober 15, 2021 05:03
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@macintacos@cstrap

[8]ページ先頭

©2009-2025 Movatter.jp