-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-90117: handle dict and mapping views in pprint #30135
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
Merged
Merged
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
f7835ca
Teach pprint about dict views with PrettyPrinter._pprint_dict_view an…
devdanzin 1eda2d5
Merge branch 'main' of https://github.com/python/cpython into pprint_…
devdanzin 9500a74
Use _private names for _dict_*_view attributes of PrettyPrinter.
devdanzin 653cdea
Use explicit 'items' keyword when calling _pprint_dict_view from _ppr…
devdanzin 884f224
📜🤖 Added by blurb_it.
blurb-it[bot] 48be1e9
Properly indent code.
devdanzin 9745491
WIP: Improve tests and make short views sortable.
devdanzin 7edb29d
fix typo
merwok 7d2fa0f
Merge branch 'main' into pprint_dict_view
merwok 32773ce
Merge branch 'main' into pprint_dict_view
arhadthedev 15dd266
Address the failing Docs check
arhadthedev 6898bc4
Merge branch 'python:main' into pprint_dict_view
devdanzin 67e3f14
Add tests for collections.abc.[Keys|Items|Mapping|Values]View support…
devdanzin 65e0be2
Add support for collections.abc.[Keys|Items|Mapping|Values]View in pp…
devdanzin c91af09
Split _pprint_dict_view into _pprint_abc_view, so pretty-printing nor…
devdanzin 5b2341c
Simplify redundant code.
devdanzin a9ff3df
Add collections.abc views to some existing pprint tests.
devdanzin 4c67166
Remove TODO.
devdanzin bfa9868
Test that views from collection.UserDict are correctly formatted by p…
devdanzin 148b469
Handle recursive dict and ABC views.
devdanzin 34abce7
Test that subclasses of ABC views work in pprint.
devdanzin 09839a6
Test dict views coming from collections.Counter.
devdanzin 091c3bb
Test ABC views coming from collections.ChainMap.
devdanzin 29655a0
Test odict views coming from collections.OrderedDict.
devdanzin 7ecb456
Merge branch 'main' into pprint_dict_view
devdanzin 646816a
Rename _pprint_abc_view to _pprint_mapping_abc_view.
devdanzin 7537a52
Add pprint test for mapping ABC views where ._mapping has a custom __…
devdanzin 7a6769d
When a mapping ABC view has a ._mapping that defines a custom __repr_…
devdanzin 7dcb9cf
Merge branch 'python:main' into pprint_dict_view
devdanzin 06babe4
Merge remote-tracking branch 'refs/remotes/origin/pprint_dict_view' i…
devdanzin 58692d2
Add tests for ABC mapping views subclasses that don't replace __repr_…
devdanzin 8e605c1
Simplify the pretty printing of ABC mapping views.
devdanzin 7e27e02
Merge branch 'python:main' into pprint_dict_view
devdanzin eb66934
Merge remote-tracking branch 'refs/remotes/origin/pprint_dict_view' i…
devdanzin 1dc4ab2
Add a test for depth handling when pretty printing dict views.
devdanzin f267452
Fix checking whether the view type is a subclass of an items view, ad…
devdanzin 3867338
Move construction of the views __repr__ set out of _safe_repr.
devdanzin 1a609d0
Merge branch 'main' into pprint_dict_view
devdanzin bca6f6f
Merge remote-tracking branch 'refs/remotes/origin/pprint_dict_view' i…
devdanzin d020f86
Merge branch 'python:main' into pprint_dict_view
devdanzin ee7b521
Merge branch 'python:main' into pprint_dict_view
devdanzin 7009887
Merge branch 'python:main' into pprint_dict_view
devdanzin 9499115
Merge branch 'main' into pprint_dict_view
devdanzin 692c0cd
Merge branch 'main' into pprint_dict_view
AA-Turner 90e069c
Merge branch 'main' into pprint_dict_view
gpshead File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
Oops, something went wrong.
Oops, something went wrong.
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.