Skip to content

Commit 33f6bb3

Browse files
committed
fix: mypy errors
1 parent c0490e3 commit 33f6bb3

File tree

9 files changed

+307
-292
lines changed

9 files changed

+307
-292
lines changed

examples/working with Signal class.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
R = 1 - np.sqrt(X**2 + Y**2)
4747
samples = np.cos(2 * np.pi * X + phi) * R
4848

49-
timestamps = np.arange(0, 2, 0.02)
49+
timestamps = np.arange(0, 2, 0.02, dtype=np.float32)
5050

5151
s_map = Signal(samples=samples, timestamps=timestamps, name="Variable Map Signal", unit="dB")
5252
s_map.plot()

pyproject.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,6 @@ module = [
110110
"cchardet.*",
111111
"cmerg.*",
112112
"fsspec.*",
113-
"h5py.*",
114-
"hdf5storage.*",
115113
"isal.*",
116114
"lz4.*",
117115
"mdfreader.*",

src/asammdf/blocks/mdf_v3.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
from .mdf_common import MDF_Common, MdfCommonKwargs
4949
from .options import GLOBAL_OPTIONS
5050
from .source_utils import Source
51-
from .types import ChannelsType, CompressionType, RasterType, StrPath
51+
from .types import ChannelsType, CompressionType, StrPath
5252
from .utils import (
5353
as_non_byte_sized_signed_int,
5454
CHANNEL_COUNT,
@@ -766,6 +766,7 @@ def _read(
766766
if filter_channels:
767767
display_names = {}
768768
if mapped:
769+
stream = typing.cast(mmap.mmap, stream)
769770
(
770771
id_,
771772
block_len,
@@ -2701,7 +2702,7 @@ def get(
27012702
name: str | None = ...,
27022703
group: int | None = ...,
27032704
index: int | None = ...,
2704-
raster: RasterType | None = ...,
2705+
raster: float | None = ...,
27052706
samples_only: Literal[False] = ...,
27062707
data: tuple[bytes, int, int | None] | None = ...,
27072708
raw: bool = ...,
@@ -2717,7 +2718,7 @@ def get(
27172718
name: str | None = ...,
27182719
group: int | None = ...,
27192720
index: int | None = ...,
2720-
raster: RasterType | None = ...,
2721+
raster: float | None = ...,
27212722
*,
27222723
samples_only: Literal[True],
27232724
data: tuple[bytes, int, int | None] | None = ...,
@@ -2734,7 +2735,7 @@ def get(
27342735
name: str | None = ...,
27352736
group: int | None = ...,
27362737
index: int | None = ...,
2737-
raster: RasterType | None = ...,
2738+
raster: float | None = ...,
27382739
samples_only: bool = ...,
27392740
data: tuple[bytes, int, int | None] | None = ...,
27402741
raw: bool = ...,
@@ -2749,7 +2750,7 @@ def get(
27492750
name: str | None = None,
27502751
group: int | None = None,
27512752
index: int | None = None,
2752-
raster: RasterType | None = None,
2753+
raster: float | None = None,
27532754
samples_only: bool = False,
27542755
data: tuple[bytes, int, int | None] | None = None,
27552756
raw: bool = False,

0 commit comments

Comments
 (0)