Skip to content

Improve IEnumVARIANT type hints. - #955

Merged
junkmd merged 5 commits into
enthought:mainfrom
junkmd:typing_IEnumVARIANT
Oct 4, 2026
Merged

junkmd merged 5 commits into
enthought:mainfrom
junkmd:typing_IEnumVARIANT

Conversation

@junkmd

@junkmd junkmd commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR improves IEnumVARIANT type hints, adding comprehensive documentation, and clarifying iterator behavior.
It also updates imports and adds type‑ignore comments to silence static‑type warnings.

junkmd added 5 commits October 4, 2026 12:23
- Add `TYPE_CHECKING` block with method signatures for `Skip`, `Reset`, and
  `Clone`.
- Provide overloads for `Next` method to return a tuple for a single element
  and a sequence for multiple elements.
- Add precise return type annotations for `__iter__`, `__next__`, and
  `__getitem__`.

These changes enhance static analysis, IDE support, and documentation clarity
for the COM enumeration interface.
@junkmd junkmd added this to the 1.5.0 / Support Python 3.15 milestone Oct 4, 2026
@junkmd junkmd added the typing related to Python static typing system label Oct 4, 2026
@junkmd junkmd changed the title improve IEnumVARIANT type hints. Improve IEnumVARIANT type hints. Oct 4, 2026
@codecov-commenter

codecov-commenter commented Oct 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.98%. Comparing base (546ee51) to head (207c3f5).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #955   +/-   ##
=======================================
  Coverage   88.98%   88.98%           
=======================================
  Files         140      140           
  Lines       13678    13679    +1     
=======================================
+ Hits        12171    12172    +1     
  Misses       1507     1507           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@junkmd
junkmd merged commit 824b7a1 into enthought:main Oct 4, 2026
169 of 193 checks passed
@junkmd
junkmd deleted the typing_IEnumVARIANT branch October 4, 2026 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

typing related to Python static typing system

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants