Commit 45c2993 1 parent 10a9ec4 commit 45c2993 Copy full SHA for 45c2993
File tree 3 files changed +7
-2
lines changed
3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [ Unreleased]
9
9
10
- Nothing yet.
10
+ - Fix issues with caching internal function calls
11
11
12
12
## [ 1.8.1] - 2023-05-12
13
13
Original file line number Diff line number Diff line change 8
8
9
9
@lru_cache (maxsize = None )
10
10
def cache (function : T ) -> T :
11
- return lru_cache (maxsize = get_cache_size ())(function ) # type: ignore
11
+ return lru_cache (maxsize = get_cache_size (), typed = True )(function ) # type: ignore
12
12
13
13
14
14
def set_cache_size (size : Optional [int ]) -> None :
Original file line number Diff line number Diff line change @@ -399,3 +399,8 @@ class FakeType:
399
399
_special = True
400
400
401
401
assert extract_generic (FakeType , defaults ) == defaults
402
+
403
+
404
+ def test_optional_and_union_none_does_not_pollute_scope_via_caching ():
405
+ is_generic (Optional [str ])
406
+ is_generic_collection (str | None )
You can’t perform that action at this time.
0 commit comments