File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Expand file tree Collapse file tree 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
77
88## [ Unreleased]
99
10- Nothing yet.
10+ - Fix issues with caching internal function calls
1111
1212## [ 1.8.1] - 2023-05-12
1313
Original file line number Diff line number Diff line change 88
99@lru_cache (maxsize = None )
1010def 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
1212
1313
1414def set_cache_size (size : Optional [int ]) -> None :
Original file line number Diff line number Diff line change @@ -399,3 +399,8 @@ class FakeType:
399399 _special = True
400400
401401 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