Skip to content
Snippets Groups Projects
Commit 0296a232 authored by Jean-Baptiste Bayle's avatar Jean-Baptiste Bayle
Browse files

Fix type hints for previous Python versions

parent e32e12d3
No related branches found
No related tags found
1 merge request!168Memory usage optimization
......@@ -12,6 +12,7 @@ import logging
import multiprocessing as mp
import os
from typing import Dict, List
from h5py import File
from lisainstrument.containers import ForEachObject
......@@ -41,9 +42,9 @@ class Cache:
def __init__(self, filename: str, nprocess: int = 1, mode: str = "x") -> None:
self.filename = filename
self.nprocess = nprocess
self.cache: dict[str, ForEachObject] = {}
self.cache: Dict[str, ForEachObject] = {}
self.processes: list[mp.Process] = []
self.processes: List[mp.Process] = []
self.temp_filenames = [f"{self.filename}.{i}" for i in range(nprocess)]
self.queue: mp.Queue = mp.Queue()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment