Skip to content

Commit

Permalink
Removed NotRequired, because it's not compatible with 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
NikoOinonen committed Mar 11, 2024
1 parent 18a406b commit 22bfd3b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mlspm/data_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import time
from os import PathLike
from pathlib import Path
from typing import Optional, TypedDict, NotRequired
from typing import Optional, TypedDict

import numpy as np
from PIL import Image
Expand Down Expand Up @@ -109,7 +109,7 @@ def get_tarinfo(fname: str, file_bytes: io.BytesIO):
info.mtime = time.time()
return info

class TarSample(TypedDict):
class TarSample(TypedDict, total=False):
"""
- ``'hartree'``: Path to the Hartree potential. First item in the tuple is the path
to the tar file relative to ``base_path``, and second entry is the tar file member name.
Expand All @@ -118,7 +118,7 @@ class TarSample(TypedDict):
- ``'rots'``: List of rotations to generate for the sample.
"""
hartree: tuple[str, str]
rho: NotRequired[tuple[str, str]]
rho: tuple[str, str]
rots: list[np.ndarray]

class TarDataGenerator:
Expand Down

0 comments on commit 22bfd3b

Please sign in to comment.