Skip to content

Commit c613b6d

Browse files
committed
Update mypy to v2.1
1 parent 2068a7d commit c613b6d

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/aiida/orm/nodes/data/array/trajectory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ def collapse_into_unit_cell(point, cell):
826826
xmin, ymin, zmin = _x.min(), _y.min(), _z.min()
827827
xmax, ymax, zmax = _x.max(), _y.max(), _z.max()
828828

829-
_xi, _yi, _zi = np.mgrid[xmin:xmax:60j, ymin:ymax:30j, zmin:zmax:30j] # type: ignore[misc]
829+
_xi, _yi, _zi = np.mgrid[xmin:xmax:60j, ymin:ymax:30j, zmin:zmax:30j]
830830
coords = np.vstack([item.ravel() for item in [_xi, _yi, _zi]])
831831
density = kde(coords).reshape(_xi.shape)
832832

src/aiida/orm/utils/links.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,10 @@ def validate_link(
176176

177177
type_source, type_target, outdegree, indegree = link_mapping[link_type]
178178

179-
if not isinstance(source, type_source) or not isinstance(target, type_target):
179+
if not isinstance(source, type_source) or not isinstance(target, type_target): # type: ignore[unreachable]
180180
raise ValueError(f'cannot add a {link_type} link from {type(source)} to {type(target)}')
181181

182-
if outdegree == 'unique_triple' or indegree == 'unique_triple':
182+
if outdegree == 'unique_triple' or indegree == 'unique_triple': # type: ignore[unreachable]
183183
# For a `unique_triple` degree we just have to check if an identical triple already exist, either in the cache
184184
# or stored, in which case, the new proposed link is a duplicate and thus illegal
185185
duplicate_link_triple = link_triple_exists(source, target, link_type, link_label, backend)

src/aiida/tools/archive/create.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def querybuilder():
239239
elif isinstance(entry, orm.Computer):
240240
starting_uuids[EntityTypes.COMPUTER].add(entry.uuid)
241241
entity_ids[EntityTypes.COMPUTER].add(entry.pk)
242-
elif isinstance(entry, orm.User):
242+
elif isinstance(entry, orm.User): # type: ignore[unreachable]
243243
starting_uuids[EntityTypes.USER].add(entry.email)
244244
entity_ids[EntityTypes.USER].add(entry.pk)
245245
else:

src/aiida/tools/graph/age_entities.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def _check_self_and_other(self, other: Self) -> None:
202202

203203
def _check_input_for_set(self, input_for_set: _NodeOrGroupCls | int) -> Any:
204204
if isinstance(input_for_set, self._aiida_cls):
205-
return getattr(input_for_set, self._identifier)
205+
return getattr(input_for_set, self._identifier) # type: ignore[unreachable]
206206

207207
if isinstance(input_for_set, self._identifier_type):
208208
return input_for_set

0 commit comments

Comments
 (0)