Skip to content

add StaticDotMap#112

Merged
FelixSchwarz merged 1 commit into
drgrib:masterfrom
FelixSchwarz:static_dotmap
Jul 11, 2026
Merged

add StaticDotMap#112
FelixSchwarz merged 1 commit into
drgrib:masterfrom
FelixSchwarz:static_dotmap

Conversation

@FelixSchwarz

@FelixSchwarz FelixSchwarz commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

This is a small utility class I wrote a long time ago. I disliked setting a "private" attribute every time.

The class behaves exactly like DotMap(_dynamic=False) (which is no wonder if you look at the actual implementation). However this means:

  • adding new attributes via __setitem__ still works
  • hence the class must be typed as MutableMapping

I'm open to changing it but that might be a bit of work.

Disclaimer: Tests written by Claude with a bit of manual tweaking afterwards.

@FelixSchwarz

Copy link
Copy Markdown
Collaborator Author

@drgrib Any comments on that addition? If you don't have an opinion, I would like to merge this.

@FelixSchwarz FelixSchwarz force-pushed the static_dotmap branch 3 times, most recently from bb9f900 to 457c03b Compare July 11, 2026 07:42
@FelixSchwarz FelixSchwarz merged commit cbb2eb7 into drgrib:master Jul 11, 2026
13 checks passed
@FelixSchwarz FelixSchwarz deleted the static_dotmap branch July 11, 2026 08:28
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.

1 participant