Skip to content

Commit

Permalink
Flake8 is a tool of the patriarchy
Browse files Browse the repository at this point in the history
  • Loading branch information
ceriottm committed Aug 25, 2023
1 parent 38879eb commit 1f8644c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/chemiscope/structures/_ase.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def extract_vectors_from_ase(frames, key="forces", **kwargs):
vectors = []

for f in frames:
if not key in f.arrays:
if key not in f.arrays:
raise IndexError(f"Key {key} not found in Atoms frame")
values = f.arrays[key]
if len(values.shape) != 2 or values.shape[1] != 3:
Expand Down Expand Up @@ -351,7 +351,7 @@ def extract_tensors_from_ase(frames, key="tensor", **kwargs):
tensors = []

for f in frames:
if not key in f.arrays:
if key not in f.arrays:
raise IndexError(f"Key {key} not found in Atoms frame")
values = f.arrays[key]
if len(values.shape) != 2 or (values.shape[1] != 6 and values.shape[1] != 9):
Expand Down

0 comments on commit 1f8644c

Please sign in to comment.