-
Notifications
You must be signed in to change notification settings - Fork 50
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
Fix custom dict overriding in collections
#722
Merged
shyuep
merged 27 commits into
materialsvirtuallab:master
from
DanielYang59:case-insensitive-dict
Dec 10, 2024
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
e612058
clean up types
DanielYang59 03fc253
remove unused _CacheInfo
DanielYang59 9b11922
clean up comments and tests
DanielYang59 ecf19a5
add test for dict2namedtuple
DanielYang59 bad6938
add test_mongo_dict
DanielYang59 dbcc676
some minor comment clean up
DanielYang59 5f4bbea
remove unused test dir
DanielYang59 ecae809
keyerror to type error
DanielYang59 284ce88
add place holder
DanielYang59 affcfe9
docstring clean up
DanielYang59 0f979b0
clean up implementation and tests
DanielYang59 9e45e02
dont override |= to be consistent with frozenset
DanielYang59 74c4fd2
fix controlled dict init
DanielYang59 c2d3c20
more human readable error message
DanielYang59 7b96038
enhance test for AttrDict
DanielYang59 a29d69f
fix test_namespace_dict
DanielYang59 dc172c1
disable delete for namespace dict
DanielYang59 86a15c1
add method shadowing warning
DanielYang59 374d462
clean up FrozenAttrDict
DanielYang59 56c65ce
simplify FrozenAttrDict
DanielYang59 777da53
clarify class var name
DanielYang59 a356b12
fix mypy but not 100% sure
DanielYang59 5240544
remove todo tag
DanielYang59 04339d8
use object attribute to avoid recursion
DanielYang59 638d1fe
fix setdefault return type
DanielYang59 d575d59
fix typo in docstring
DanielYang59 a1d0a13
clean up test
DanielYang59 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
There are no files selected for viewing
This file contains 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 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.
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.
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.
If I understand correctly,
Namespace
is a dict that only allows adding new items but rejects updating existing items, however I don't really understand why it's calledNamespace
?monty/src/monty/collections.py
Lines 57 to 58 in a3d35a6
The original implementation also allows "delete" item and current implementation would NOT allow such operation: