Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python: improve feature decorator return type so it doesn't affect Pylance #10704

Merged
merged 1 commit into from
Feb 27, 2025

Conversation

moonbox3
Copy link
Contributor

Motivation and Context

The new feature decorator was impacting Pylance and child classes weren't properly resolving methods due to the decorator's return type handling.

Description

Update the decorator so it handles the return types properly.

Contribution Checklist

@moonbox3 moonbox3 requested a review from a team as a code owner February 27, 2025 03:41
@markwallace-microsoft markwallace-microsoft added the python Pull requests for the Python Semantic Kernel label Feb 27, 2025
@markwallace-microsoft
Copy link
Member

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
semantic_kernel/agents/azure_ai
   agent_content_generation.py1452086%68–71, 89, 91, 286, 338–370
   agent_thread_actions.py34112962%140, 142, 177–180, 367, 369, 408–409, 435, 438–442, 445–457, 460–491, 497–504, 507–520, 536–567, 611, 614, 643–677, 740, 745–750, 770–777, 808–817, 860–870
TOTAL18865236687% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
3170 5 💤 0 ❌ 0 🔥 1m 24s ⏱️

@moonbox3 moonbox3 enabled auto-merge February 27, 2025 04:01
@moonbox3 moonbox3 added this pull request to the merge queue Feb 27, 2025
github-merge-queue bot pushed a commit that referenced this pull request Feb 27, 2025
…lance (#10704)

### Motivation and Context

The new feature decorator was impacting Pylance and child classes
weren't properly resolving methods due to the decorator's return type
handling.

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

Update the decorator so it handles the return types properly.

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 27, 2025
@moonbox3 moonbox3 added this pull request to the merge queue Feb 27, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 27, 2025
@moonbox3 moonbox3 added this pull request to the merge queue Feb 27, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 27, 2025
@moonbox3 moonbox3 added this pull request to the merge queue Feb 27, 2025
@moonbox3 moonbox3 removed this pull request from the merge queue due to a manual request Feb 27, 2025
@moonbox3 moonbox3 merged commit caef2f3 into microsoft:main Feb 27, 2025
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Pull requests for the Python Semantic Kernel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants