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

Improvements to NestedMapping #8

Merged
merged 9 commits into from
Nov 14, 2023
Merged

Improvements to NestedMapping #8

merged 9 commits into from
Nov 14, 2023

Conversation

teutoburg
Copy link
Collaborator

@teutoburg teutoburg commented Nov 13, 2023

  • Printing and iterating over NestedMapping now considers nested keys first for each sub-level of nesting, similar to what is commonly seen in tree-like structures. This also applies to NestedMapping.keys().
  • NestedMapping now accepts an optional argument title, which becomes a property and is included in the string representation. If not set, this will default to the class name.
  • A warning is logged if a bang-string is found in a key. The resulting behavior is unchanged.
    This should resolve Bang-string properties keys are not always caught #4 for now.

@teutoburg teutoburg marked this pull request as ready for review November 13, 2023 18:50
@teutoburg teutoburg added enhancement New feature or request API How users interact with the software tests Related to unit or integration tests labels Nov 13, 2023
@teutoburg teutoburg self-assigned this Nov 13, 2023
Copy link
Collaborator

@hugobuddel hugobuddel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine

Co-authored-by: Hugo Buddelmeijer <[email protected]>
Copy link

codecov bot commented Nov 14, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (fd01a70) 100.00% compared to head (616dea5) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main        #8   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            5         5           
  Lines          356       386   +30     
=========================================
+ Hits           356       386   +30     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@teutoburg teutoburg merged commit 98f9271 into main Nov 14, 2023
18 checks passed
@teutoburg teutoburg deleted the fh/morenestmap branch November 14, 2023 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API How users interact with the software enhancement New feature or request tests Related to unit or integration tests
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Bang-string properties keys are not always caught
2 participants