From 8c089288b9c0c4c8d6273e4455cbd79708a5df7a Mon Sep 17 00:00:00 2001 From: bjhardcastle Date: Sun, 31 Dec 2023 20:27:54 -0800 Subject: [PATCH] Ttempt to fix mypy errors --- src/npc_lims/paths/cache.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/npc_lims/paths/cache.py b/src/npc_lims/paths/cache.py index e8b1d3c..7a76f90 100644 --- a/src/npc_lims/paths/cache.py +++ b/src/npc_lims/paths/cache.py @@ -6,12 +6,12 @@ import npc_session import packaging.version import upath - +from typing_extensions import TypeAlias import npc_lims.paths.s3 CACHE_ROOT = npc_lims.paths.s3.S3_SCRATCH_ROOT / "session-caches" -NWBComponentStr = Literal[ +NWBComponentStr: TypeAlias = Literal[ "session", "subject", "units", @@ -23,7 +23,7 @@ "devices", ] -CACHED_FILE_EXTENSIONS: dict[str, str] = dict.fromkeys(typing.get_args(NWBComponentStr), '.parquet') +CACHED_FILE_EXTENSIONS: dict[str, str] = dict.fromkeys(str(typing.get_args(NWBComponentStr)), '.parquet') """Mapping of NWB component name to file extension""" assert CACHED_FILE_EXTENSIONS.keys() == set(