-
Notifications
You must be signed in to change notification settings - Fork 26
Base Affine on attrs #111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Base Affine on attrs #111
Conversation
| rev: v1.13.0 | ||
| hooks: | ||
| - id: mypy | ||
| additional_dependencies: [attrs] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Required to use the attrs mypy plugin.
|
@mwtoews what do you think? |
mwtoews
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good! I had a look at std dataclasses too, but found the transition not clear-cut. I had a look at refactoring with typing.NamedTuple too (shown here), but this didn't look any better. While I'm not an attrs user, this dependency seems well maintained.
Namedtuple is a bit awkward to use and today people would expect Affine to be a modern data class. I tried to use the stdlib's dataclasses at first, but was blocked by the lack of converters.
Will rebase this once #110 is merge.