mirror of
https://github.com/Instagram/LibCST.git
synced 2025-12-23 10:35:53 +00:00
check cache is not None
This commit is contained in:
parent
b8fd1a78e4
commit
cd0252bbb9
1 changed files with 1 additions and 1 deletions
|
|
@ -49,7 +49,7 @@ class BaseMetadataProvider(MetadataDependent, Generic[_ProvidedMetadataT]):
|
|||
def __init__(self, cache: object = None) -> None:
|
||||
super().__init__()
|
||||
self._computed = {}
|
||||
if self.is_cache_required and not cache:
|
||||
if self.is_cache_required and cache is not None:
|
||||
# The metadata provider implementation is responsible to store and use cache.
|
||||
raise Exception(
|
||||
f"Cache is required for initializing {self.__class__.__name__}."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue