Skip to content

Commit bc0df09

Browse files
committed
misc: Fix wrong merge conflict fix with main
1 parent 98880f1 commit bc0df09

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

devito/symbolics/inspection.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from contextlib import suppress
21
from functools import singledispatch
32

43
import numpy as np
@@ -318,13 +317,14 @@ def sympy_dtype(expr, base=None, default=None, smin=None):
318317

319318
dtypes = set()
320319

321-
def inspect_args(e):
322-
for arg in e.args:
323-
with suppress(AttributeError):
324-
dtypes.add(arg.dtype)
325-
inspect_args(arg)
320+
def inspect(e):
321+
try:
322+
dtypes.add(e.dtype)
323+
except AttributeError:
324+
for arg in e.args:
325+
inspect(arg)
326326

327-
inspect_args(expr)
327+
inspect(expr)
328328

329329
if not dtypes or not np.issubdtype(base, np.complexfloating):
330330
dtypes.update({base} - {None})

0 commit comments

Comments
 (0)