Skip to content

Fixing Type Hints on is enabled/get varient - #78

Merged
Matthew Metcalf (mrm9084) merged 1 commit into
mainfrom
TypeHintFix
Nov 5, 2026
Merged

Matthew Metcalf (mrm9084) merged 1 commit into
mainfrom
TypeHintFix

Conversation

@mrm9084

@mrm9084 Matthew Metcalf (mrm9084) commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Description

Fixes #62

The method signature was never udpated for user_id support as a property.

Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.
  • Pull request includes test coverage for the included changes.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues remain for the synchronous and asynchronous FeatureManager typing updates.

No open issues 🎉

What changed in this PR

Fixes #62 by aligning synchronous and asynchronous FeatureManager type hints with supported runtime calls, without changing runtime behavior.

Changes:

  • Updates is_enabled and get_variant overloads to support calls without a user identifier and with a positional TargetingContext.
  • Adds mypy regression tests checking exact return types across both APIs, including custom keyword arguments.
  • Documents the typing fix in the changelog.
File Description
tests/​test_typing.py Adds parameterized static typing checks for sync and async calls.
featuremanagement/​aio/​_featuremanager.py Corrects async overloads and clarifies positional context documentation.
featuremanagement/​_featuremanager.py Applies matching overload and documentation changes to the sync API.
CHANGELOG.md Records the typing corrections under unreleased bug fixes.

Review effort: Balanced

@mrm9084
Matthew Metcalf (mrm9084) merged commit 810a3ef into main Nov 5, 2026
9 checks passed
@mrm9084
Matthew Metcalf (mrm9084) deleted the TypeHintFix branch November 5, 2026 18:26
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.

Typing bug in FeatureManager.is_enabled overloads: single argument call not supported by type hints

3 participants