Skip to content

fix: cachetools.__wrapped__ attribute typing for cached functions#13701

Open
markparonyan wants to merge 14 commits into
python:mainfrom
markparonyan:fix-cachetools-wrapped-attribute
Open

fix: cachetools.__wrapped__ attribute typing for cached functions#13701
markparonyan wants to merge 14 commits into
python:mainfrom
markparonyan:fix-cachetools-wrapped-attribute

Conversation

@markparonyan
Copy link
Copy Markdown

@markparonyan markparonyan commented Mar 22, 2025

#13644

I also created a test file for this issue, but don't know how to run this test in ci.
MYPYPATH=stubs/cachetools/ mypy --python-version 3.11 tests/cachetools_wrapped_test.py

@github-actions

This comment has been minimized.

@srittau
Copy link
Copy Markdown
Collaborator

srittau commented Mar 25, 2025

The test file should be moved to stubs/cachetools/@tests. This should get rid of the current CI problems.

Comment thread stubs/cachetools/cachetools/__init__.pyi Outdated
Comment thread stubs/cachetools/cachetools/__init__.pyi Outdated
@github-actions
Copy link
Copy Markdown
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

freqtrade (https://github.com/freqtrade/freqtrade)
+ freqtrade/plugins/pairlistmanager.py:132: error: Missing positional argument "self" in call to "__call__" of "_Wrapped"  [call-arg]

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.

3 participants