We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0fe816c commit 9aa3d9fCopy full SHA for 9aa3d9f
mypy/plugins/functools.py
@@ -410,7 +410,8 @@ def functools_lru_cache_callback(ctx: mypy.plugin.FunctionContext) -> Type:
410
first_arg_type = ctx.arg_types[0][0]
411
412
# Explicitly check that this is NOT a literal or other non-function type
413
- from mypy.types import LiteralType, Instance
+ from mypy.types import Instance, LiteralType
414
+
415
proper_first_arg_type = get_proper_type(first_arg_type)
416
if isinstance(proper_first_arg_type, (LiteralType, Instance)):
417
# This is likely maxsize=128 or similar - let MyPy handle it
0 commit comments