Skip to content

Fixed: both __getattr__ and __getitem__ - they need to wrap list items that are dicts.#2

Merged
sn merged 1 commit into
mainfrom
chore/getattr-dicts-wrapping
Jan 25, 2026
Merged

Fixed: both __getattr__ and __getitem__ - they need to wrap list items that are dicts.#2
sn merged 1 commit into
mainfrom
chore/getattr-dicts-wrapping

Conversation

@sn

@sn sn commented Jan 25, 2026

Copy link
Copy Markdown
Contributor

This pull request updates the NitroDataStore package to version 1.0.2 and enhances how nested dictionaries and lists are handled when accessing data. The main improvement is that now all nested dictionaries, including those inside lists, are automatically wrapped as NitroDataStore objects, ensuring consistent access patterns throughout the data structure.

Enhancements to nested data access:

  • Added a _wrap_value helper method in NitroDataStore to recursively wrap dictionaries (including those inside lists) as NitroDataStore instances, improving consistency when accessing nested data.
  • Updated both __getitem__ and __getattr__ methods to use _wrap_value, so accessing nested dicts or lists of dicts always returns wrapped objects for chainable access. [1] [2]

Version bump:

  • Updated the version number to 1.0.2 in both nitro_datastore/__init__.py and pyproject.toml. [1] [2]

@sn sn self-assigned this Jan 25, 2026
@sn sn merged commit 970c2a0 into main Jan 25, 2026
6 checks passed
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