-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Implement support for returning TypedDict for dataclasses.asdict #8583
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
Open
syastrov
wants to merge
46
commits into
python:master
Choose a base branch
from
syastrov:dataclasses-asdict
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
bb9f051
Implement support for returning TypedDict for dataclasses.asdict
syastrov e2f9f06
Remove redundant test. Fix comment typo.
syastrov 2f6ec2d
Test for cases where dataclasses.asdict is called on non-dataclass in…
syastrov a9779e2
Clean up tests, and test more edge-cases.
syastrov c5d0a15
Remove no-longer-needed type: ignore on CheckerPluginInterface.module…
syastrov 454431d
Make typeddicts non-total.
syastrov d809e8b
Address some of review comments (formatting, docs, code nitpicks, rem…
syastrov 4d195cc
Simplify: Remove _transform_type_args and remove unneeded None check …
syastrov b33798c
Fix unused import
syastrov fe19bc9
Add fine-grained test for dataclasses.asdict.
syastrov 6328a7c
Oops, add forgotten fine-grained dataclasses test. And remove redunda…
syastrov 4694299
Only import the module containing TypedDict fallback if dataclasses i…
syastrov 9c29081
Only enable TypedDict for Python >= 3.8.
syastrov d7df77a
Refactor asdict implementation to use TypeTranslator instead of recur…
syastrov e9a56ba
Made TypedDicts returned by asdict total again.
syastrov 2e5240e
Fixed test after total change.
syastrov 52a1c27
Make code a bit more readable, and a bit more robust.
syastrov 43f174c
Fix typo
syastrov 227ba90
After refactoring to use TypeTranslator, ensure Callable and Type[..]…
syastrov d12c665
Address second review comments.
syastrov 45e72d7
Fix return type
syastrov a03f033
Try to address more review comments and fix flake8
syastrov b4d7e15
Add fine grained deps test to help debug asdict dependencies.
syastrov d96d977
Fix some asdict tests missing tuple dependency
syastrov 441b665
Revert "Fix some asdict tests missing tuple dependency"
syastrov 344ca6a
Don't need dep on typing_extensions
syastrov c8858fa
Checker lookup_fully_qualified_or_none: Don't raise KeyError, return …
syastrov 20d7716
Add dependencies for asdict on the referenced dataclasses and its att…
syastrov 5fec41b
Fix fine-grained no-cache test by adding correct dep on dataclass attrs.
syastrov 5862c16
remove unused imports
syastrov 26b7393
Merge branch 'master' into dataclasses-asdict
syastrov d7e0310
Remove error when passing a "non-dataclass" to asdict to reduce false…
syastrov 080c00c
Fix flake8
syastrov 9e45f8f
Fix asdict tests (require using python version 3.7 minimum).
syastrov 38b466a
Merge branch 'master' into dataclasses-asdict
syastrov 74ebc6f
Fix tests for quoting changes
syastrov aef274a
Merge branch 'master' into dataclasses-asdict
97littleleaf11 79f25db
Merge
97littleleaf11 f54e503
Fix
97littleleaf11 9820cfc
Add fixture for tests
97littleleaf11 9f49cac
Add fixture for tests
97littleleaf11 fcd1ff5
Add fixture for tests
97littleleaf11 9fa6a6b
Merge from master
97littleleaf11 6e1585d
Fix
97littleleaf11 d6f9170
Merge branch 'master' of https://github.com/python/mypy into HEAD
97littleleaf11 e226562
Test for a workaround
97littleleaf11 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Simplify: Remove _transform_type_args and remove unneeded None check …
…in get_anonymous_typeddict_type.
- Loading branch information
commit 4d195ccde18fe3894529cb79f16cd066967acb8c
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.