Skip to content

Conversation

Vizonex
Copy link

@Vizonex Vizonex commented Jul 5, 2025

What do these changes do?

These changes optimize a few functions and fix mypy for the pull request made with #508

Are there changes in behavior for the user?

Maybe a performance increase although my changes mainly nested in a single coroutine in order to enhance execution.

A Word for VS-Code Users

There is currently no fix for VS Code Users even though the code works correctly. This is something that someone is going to have to be brought up with the VS-Code Development team directly as it's not our faults. Now maybe if your using a different extension there will be a patch in the future but I think the only way this will be solved if we go ahead and add this on our end or add in a comment mentioning this bug and how it affects users who wish to use method descriptors.

Related issue number

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes

@Vizonex Vizonex changed the title a mypy fixes and a few optimizations MyPy fixes and a few optimizations Jul 5, 2025
@Vizonex
Copy link
Author

Vizonex commented Jul 5, 2025

This pr is for #508 btw.

Copy link

codecov bot commented Jul 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (paramspec@0950988). Learn more about missing BASE report.

Additional details and impacted files
@@             Coverage Diff              @@
##             paramspec     #675   +/-   ##
============================================
  Coverage             ?   96.63%           
============================================
  Files                ?       12           
  Lines                ?      803           
  Branches             ?       33           
============================================
  Hits                 ?      776           
  Misses               ?       25           
  Partials             ?        2           
Flag Coverage Δ
unit 96.26% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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.

Copy link
Member

@Dreamsorcerer Dreamsorcerer left a comment

Choose a reason for hiding this comment

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

This PR has 12 type errors, which is 2 more than without the changes in this PR...

@Dreamsorcerer
Copy link
Member

I'm still not seeing any type fixes yet. The thing we need to focus on is resolving the type errors with methods, as described in #508 (comment)

@Vizonex
Copy link
Author

Vizonex commented Jul 12, 2025

I'm still not seeing any type fixes yet. The thing we need to focus on is resolving the type errors with methods, as described in #508 (comment)

@Dreamsorcerer I agree. There's also some bugs with trying to fix Self functions in the tests. There's a bug with A.coro where it hints as [(self:A), ...] instead of [(), ...] which mypy complains about as well. I thought about giving alru-cache a dummy argument to overload class methods vs functions as an overload wrapper to maybe try and patch it until python wants to give better support to Concatenate & ParamSpec in the future. I there's a chance mypy can accept it and I'll report back my findings...

@Dreamsorcerer
Copy link
Member

I'm pretty sure that's the issue I highlighted in the comment, not a bug with mypy. As mentioned, I think the most likely option to work is splitting into 2 subclasses to handle method and non-method separately.

@Dreamsorcerer Dreamsorcerer marked this pull request as draft July 14, 2025 23:10
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