Skip to content

Update Typehint annotations#193

Open
Vizonex wants to merge 7 commits intoaio-libs:masterfrom
Vizonex:update-typehints
Open

Update Typehint annotations#193
Vizonex wants to merge 7 commits intoaio-libs:masterfrom
Vizonex:update-typehints

Conversation

@Vizonex
Copy link
Copy Markdown
Member

@Vizonex Vizonex commented Jan 22, 2026

What do these changes do?

I ran pyupgrade on this file and made a few adjustments to allow 3.9 to sill be backwards compatible.

Are there changes in behavior for the user?

Not really but users should be aware that 3.9 could be dropped at any point in the future. For now, I have added from __future__ import annotations to provide any needed backwards compatibility for this version but users should start thinking about updating to newer versions of python in the meantime.

Related issue number

Checklist

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


@overload
def __get__(self, inst: None, owner: Optional[type[object]] = None) -> Self: ...
def __get__(self, inst: None, owner: type[object] | None = None) -> Self: ...

Check notice

Code scanning / CodeQL

Statement has no effect Note

This statement has no effect.
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Jan 22, 2026
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Jan 22, 2026

Merging this PR will not alter performance

✅ 4 untouched benchmarks


Comparing Vizonex:update-typehints (bb60503) with master (e6b12fc)

Open in CodSpeed

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 22, 2026

Codecov Report

❌ Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 97.64%. Comparing base (e6b12fc) to head (bb60503).

Files with missing lines Patch % Lines
src/propcache/_helpers_py.py 83.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master     #193   +/-   ##
=======================================
  Coverage   97.63%   97.64%           
=======================================
  Files          17       17           
  Lines         847      848    +1     
  Branches       44       44           
=======================================
+ Hits          827      828    +1     
  Misses         12       12           
  Partials        8        8           
Flag Coverage Δ
CI-GHA 97.64% <83.33%> (+<0.01%) ⬆️
MyPy 91.85% <83.33%> (+<0.01%) ⬆️
OS-Linux 97.49% <100.00%> (+<0.01%) ⬆️
OS-Windows 94.53% <100.00%> (+0.01%) ⬆️
OS-macOS 94.53% <100.00%> (+0.01%) ⬆️
Py-3.10.11 92.71% <100.00%> (+0.01%) ⬆️
Py-3.10.19 94.53% <100.00%> (+0.01%) ⬆️
Py-3.11.14 79.72% <100.00%> (-16.40%) ⬇️
Py-3.11.15 94.30% <100.00%> (+14.62%) ⬆️
Py-3.11.9 94.30% <100.00%> (+0.01%) ⬆️
Py-3.12.10 94.30% <100.00%> (+0.01%) ⬆️
Py-3.12.12 96.12% <100.00%> (+<0.01%) ⬆️
Py-3.13.11 94.30% <100.00%> (+0.01%) ⬆️
Py-3.13.12 96.12% <100.00%> (+<0.01%) ⬆️
Py-3.13.12t 96.12% <100.00%> (+<0.01%) ⬆️
Py-3.14.2 94.26% <100.00%> (+0.02%) ⬆️
Py-3.14.3 96.10% <100.00%> (+0.01%) ⬆️
Py-3.14.3t 96.10% <100.00%> (+0.01%) ⬆️
Py-3.9.13 92.69% <100.00%> (+0.01%) ⬆️
Py-3.9.25 94.52% <100.00%> (+0.01%) ⬆️
Py-pypy3.10.16-7.3.19 78.13% <100.00%> (+0.04%) ⬆️
Py-pypy3.9.19-7.3.16 78.08% <100.00%> (+0.05%) ⬆️
VM-macos-latest 94.53% <100.00%> (+0.01%) ⬆️
VM-ubuntu-latest 97.49% <100.00%> (+<0.01%) ⬆️
VM-windows-11-arm 94.30% <100.00%> (+0.01%) ⬆️
VM-windows-latest 94.53% <100.00%> (+0.01%) ⬆️
pytest 97.49% <100.00%> (+<0.01%) ⬆️

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided There is a change note present in this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants