mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-17 14:04:52 +02:00
Add more type annotations
This commit is contained in:
@@ -56,9 +56,9 @@ def atomic_save(data: bytes, path: str) -> None:
|
||||
|
||||
|
||||
@contextmanager
|
||||
def cached_values_for(name: str) -> Generator[Dict, None, None]:
|
||||
def cached_values_for(name: str) -> Generator[Dict[str, Any], None, None]:
|
||||
cached_path = os.path.join(cache_dir(), name + '.json')
|
||||
cached_values: Dict = {}
|
||||
cached_values: Dict[str, Any] = {}
|
||||
try:
|
||||
with open(cached_path, 'rb') as f:
|
||||
cached_values.update(json.loads(f.read().decode('utf-8')))
|
||||
|
||||
Reference in New Issue
Block a user