Skip to content
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

Remove mypy plugin for dataclass. #2514

Merged
merged 3 commits into from
Dec 20, 2022
Merged

Remove mypy plugin for dataclass. #2514

merged 3 commits into from
Dec 20, 2022

Conversation

jaheba
Copy link
Contributor

@jaheba jaheba commented Dec 20, 2022

We used to tell mypy that serde.dataclass is a dataclass using the plugin. However, that led to mypy failing (no idea why).

The trick is use TYPE_CHECKING to make mypy assume that serde.dataclass is the same as dataclasses.dataclass.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Please tag this pr with at least one of these labels to make our release process faster: BREAKING, new feature, bug fix, other change, dev setup

@jaheba jaheba added the pending v0.11.x backport This contains a fix to be backported to the v0.11.x branch label Dec 20, 2022
@jaheba jaheba enabled auto-merge (squash) December 20, 2022 13:33
@jaheba jaheba disabled auto-merge December 20, 2022 13:33
@jaheba jaheba merged commit 53265eb into awslabs:dev Dec 20, 2022
@jaheba jaheba deleted the dataclass-mypy branch December 20, 2022 13:33
lostella pushed a commit to lostella/gluonts that referenced this pull request Jan 2, 2023
@lostella lostella mentioned this pull request Jan 2, 2023
lostella added a commit that referenced this pull request Jan 3, 2023
* Fix `serde.dataclass` inheritance handling. (#2512)

Further simplified impementation.

* Fix `QuantileForecast.quantile` in case only mean is stored (#2513)

* Remove mypy plugin for dataclass. (#2514)

* GH Actions: Use authenticated requests for just. (#2522)

* Fix `aggregate_valid` for non-numerical columns (#2526)

* Make serde.dataclass always kw-only. (#2428)

Co-authored-by: Jasper <[email protected]>
@lostella lostella removed the pending v0.11.x backport This contains a fix to be backported to the v0.11.x branch label Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants