Skip to content

Commit

Permalink
Fix typing error under mypy 0.990
Browse files Browse the repository at this point in the history
  • Loading branch information
jwodder committed Nov 11, 2022
1 parent c66fd18 commit 3452a27
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dandi/files/_private.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from __future__ import annotations

from collections.abc import Mapping
from dataclasses import dataclass
from enum import Enum
from pathlib import Path
from typing import ClassVar
import weakref

from dandi.consts import (
Expand All @@ -14,6 +16,7 @@

from .bases import DandiFile, GenericAsset, LocalAsset, NWBAsset, VideoAsset
from .bids import (
BIDSAsset,
BIDSDatasetDescriptionAsset,
GenericBIDSAsset,
NWBBIDSAsset,
Expand Down Expand Up @@ -54,7 +57,7 @@ def classify(path: Path) -> DandiFileType:
class DandiFileFactory:
""":meta private:"""

CLASSES: dict[DandiFileType, type[LocalAsset]] = {
CLASSES: Mapping[DandiFileType, type[LocalAsset]] = {
DandiFileType.NWB: NWBAsset,
DandiFileType.ZARR: ZarrAsset,
DandiFileType.VIDEO: VideoAsset,
Expand All @@ -74,7 +77,7 @@ class BIDSFileFactory(DandiFileFactory):

bids_dataset_description: BIDSDatasetDescriptionAsset

CLASSES = {
CLASSES: ClassVar[Mapping[DandiFileType, type[BIDSAsset]]] = {
DandiFileType.NWB: NWBBIDSAsset,
DandiFileType.ZARR: ZarrBIDSAsset,
DandiFileType.VIDEO: GenericBIDSAsset,
Expand Down

0 comments on commit 3452a27

Please sign in to comment.