Skip to content

Commit

Permalink
ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrubeck committed Feb 15, 2025
1 parent 93f9ad8 commit 6f6bca4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ufl/tensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,10 @@ def sub(e, *indices):
and all(sub(e, 0, 0) == sub(e0, 0, 0) for e in expressions[1:])
):
indices = [sub(e, 0, 1).indices() for e in expressions]
if all(i[0] == k and all(isinstance(subindex, Index) for subindex in i[1:])
for k, i in enumerate(indices)):
if all(
i[0] == k and all(isinstance(subindex, Index) for subindex in i[1:])
for k, i in enumerate(indices)
):
return sub(e0, 0, 0)

# Construct a new instance to be initialised
Expand Down

0 comments on commit 6f6bca4

Please sign in to comment.