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

Use ParamSpec for wrapped signatures #508

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

Dreamsorcerer
Copy link
Member

@Dreamsorcerer Dreamsorcerer commented Jul 25, 2023

Fixes #504.

There are still a couple of issues with this.

  1. Typing doesn't seem to work correctly with instance methods. Not sure exactly what is going wrong here, needs some more investigation.
  2. partial() use will cause new type errors. We can either wait until partial() is properly supported by typedshed/mypy (functools.partial should use PEP612 ParamSpec (depends on #8708) python/typeshed#8703 / functools.partial support python/mypy#1484), or we could expose a TypeAlias of _LRUCacheWrapper so it can be used in type annotations.
  3. There also seems to be an issue with pypy, possibly a bug in pypy, but needs further investigation.

@codecov
Copy link

codecov bot commented Jul 25, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.92%. Comparing base (f60bf71) to head (0e56d88).
Report is 52 commits behind head on master.

Current head 0e56d88 differs from pull request most recent head c8156f9

Please upload reports for the commit c8156f9 to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #508      +/-   ##
==========================================
+ Coverage   96.88%   96.92%   +0.03%     
==========================================
  Files          12       12              
  Lines         770      780      +10     
  Branches       91       93       +2     
==========================================
+ Hits          746      756      +10     
  Misses         22       22              
  Partials        2        2              
Flag Coverage Δ
unit 96.53% <91.66%> (-0.22%) ⬇️

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.

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.

Signature of decorated function is not type checked by mypy
1 participant