Skip to content

Subclassing TTLCache[KT, VT] loses generic type inference on instantiation#15834

Open
ApusBerliozi wants to merge 1 commit into
python:mainfrom
ApusBerliozi:15798_fix_TTLCache_generic_type_inference_on_instantation
Open

Subclassing TTLCache[KT, VT] loses generic type inference on instantiation#15834
ApusBerliozi wants to merge 1 commit into
python:mainfrom
ApusBerliozi:15798_fix_TTLCache_generic_type_inference_on_instantation

Conversation

@ApusBerliozi
Copy link
Copy Markdown
Contributor

Closes: #15798

Splitted overload for __init__ in TTLCache to make getsizeof None in one case, as was requested in the issue. Also added test, that checks whether or not there is a third implicit type parameter. However, I'm not sure about this one, mb I had to work with timer arument?

@github-actions
Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

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.

cachetools: Subclassing TTLCache[KT, VT] loses generic type inference on instantiation

1 participant