Skip to content

[Bug] Ensure Registry dictionary API works identical to the method API #366

@JeremyWurbs

Description

@JeremyWurbs

Description

Currently, the Registry's dictionary API does not perfectly mirror its methods API, leading to some subtle bugs.

For instance:

from mindtrace.registry import Registry

reg = Registry()

reg[["a", "b"]] = [1, 2]

reg[["a", "b"]] = [10, 20]  # BUG: command goes through, but values are NOT updated
reg.save(["a", "b"]) = [10, 20]  # works as expected, values ARE updated

Similarly:

del reg[["a", "b"]]  # BUG: raises TypeError: unhashable type: 'list'
reg.delete(["a", "b"])  # works as expected

Acceptance Criteria

  • Ensure Registry's dictionary API perfectly aligns with its methods API
  • Unit tests demonstrating the above with 100% coverage

Priority

Medium (important but not urgent)

Estimated Effort (Story Points)

1 (0.5 day)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmindtrace-registryIssues raised from registry module in mindtrace package

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions