Skip to content

Commit b42b0b8

Browse files
tomwhitemergify[bot]
authored andcommitted
Fix new mypy errors
1 parent 00140b0 commit b42b0b8

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ repos:
2626
hooks:
2727
- id: mypy
2828
args: ["--strict", "--show-error-codes"]
29-
additional_dependencies: ["numpy>=1.21.2", "xarray>=0.17.0", "dask[array]", "scipy", "typing-extensions", "zarr", "numba", "dask-ml", "networkx"]
29+
additional_dependencies: ["numpy>=1.21.2", "xarray", "dask[array]", "scipy", "typing-extensions", "zarr", "numba", "dask-ml", "networkx"]

sgkit/display.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,17 +108,19 @@ def truncate(ds: xr.Dataset, max_sizes: Mapping[Hashable, int]) -> xr.Dataset:
108108

109109
limits = {dims[0]: m_dim[0], dims[1]: m_dim[1]}
110110
slices = {k: slice(v) for k, v in limits.items()}
111-
ds_abbr: xr.Dataset = xr.combine_nested( # type: ignore[no-untyped-call]
111+
ds_abbr: xr.Dataset = xr.combine_nested(
112112
[
113113
[
114114
# Roll all of these simultaneously along with any indexes/coords
115115
# and then clip them using the same slice for each corner
116-
ds.roll(dict(zip(limits, roll)), roll_coords=True).isel(**slices)
116+
ds.roll(dict(zip(limits, roll)), roll_coords=True).isel( # type: ignore[misc]
117+
**slices # type: ignore[arg-type]
118+
)
117119
for roll in row
118120
]
119121
for row in rows
120122
],
121-
concat_dim=limits.keys(),
123+
concat_dim=limits.keys(), # type: ignore[arg-type]
122124
)
123125

124126
assert ds_abbr.sizes[dims[0]] <= max_dim[0] + 2

sgkit/tests/test_association.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def _generate_test_dataset(**kwargs: Any) -> Dataset:
111111
# relationship with trait j where i != j
112112
data_vars[f"trait_{i}"] = (["samples"], ys[i])
113113
attrs = dict(beta=bg, n_trait=ys.shape[0], n_covar=x.shape[1])
114-
return xr.Dataset(data_vars, attrs=attrs) # type: ignore[arg-type]
114+
return xr.Dataset(data_vars, attrs=attrs)
115115

116116

117117
def _generate_regenie_test_dataset(**kwargs: Any) -> Dataset:
@@ -135,7 +135,7 @@ def _generate_regenie_test_dataset(**kwargs: Any) -> Dataset:
135135
)
136136

137137
attrs = dict(beta=bg, n_trait=ys.shape[0], n_covar=x.shape[1])
138-
return xr.Dataset(data_vars, attrs=attrs) # type: ignore[arg-type]
138+
return xr.Dataset(data_vars, attrs=attrs)
139139

140140

141141
@pytest.fixture(scope="module")

0 commit comments

Comments
 (0)