Skip to content

Conversation

@cofin
Copy link
Member

@cofin cofin commented Dec 10, 2025

  • Update the configuration registry to use instance IDs as keys, allowing multiple configurations of the same adapter type. - Modify the add_config method to return the configuration instance directly and ensure all relevant methods accept configuration instances.
  • Introduce validation for unregistered configurations and add a new method to retrieve configurations by type.
  • Remove deprecated methods and update tests accordingly.

- Changed the configuration registry to use `id(config)` as the key instead of `type(config)`, allowing multiple configurations of the same adapter type.
- Updated `add_config` method to return the configuration instance instead of its type.
- Modified all relevant methods to accept configuration instances directly, removing type-based signatures.
- Added validation to raise `ValueError` if a configuration is not registered when accessed.
- Introduced a new method `get_config_by_type` to retrieve the first matching configuration by type.
- Updated unit tests to cover the new behavior and ensure backward compatibility where necessary.
@cofin cofin merged commit 27532c8 into main Dec 10, 2025
10 checks passed
@cofin cofin deleted the feat/type-safe-handles branch December 10, 2025 14:42
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.

2 participants