Skip to content

TEST: cover instance registry return types (P311-04) - #3686

Merged
Roman Lutz (romanlutz) merged 3 commits into
microsoft:mainfrom
mehmetl33t:feat/p311-04-instance-registry-type-checks
Oct 31, 2026
Merged

Roman Lutz (romanlutz) merged 3 commits into
microsoft:mainfrom
mehmetl33t:feat/p311-04-instance-registry-type-checks

Conversation

@mehmetl33t

Copy link
Copy Markdown
Contributor

Summary

  • Add type-regression checks with assert_type for DefaultInstanceRegistry[T].get, get_entry, and get_all_instances in tests/unit/registry/test_instance_registry.py.
  • Verify return types (T | None, RegistryEntry[T] | None, list[RegistryEntry[T]]) are preserved for both DefaultInstanceRegistry[T] and a consumer typed as InstanceRegistry[T].
  • Retain instance identity, missing-name None behavior, and sorted order without modifying runtime code.

Part of #3166 (Item P311-04)

@mehmetl33t

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

@romanlutz
Roman Lutz (romanlutz) added this pull request to the merge queue Oct 31, 2026
Merged via the queue into microsoft:main with commit 791e12c Oct 31, 2026
73 of 96 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.

2 participants