Skip to content

Commit

Permalink
STY: flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
jwboth committed Aug 29, 2024
1 parent d2d416a commit 9e1ff3e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/darsia/utils/linalg.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ def solve(self, b: np.ndarray, **kwargs) -> np.ndarray:
try:
from petsc4py import PETSc

KSPreasons = _make_reasons(PETSc.KSP.ConvergedReason())

def _make_reasons(reasons):
return dict(
[(getattr(reasons, r), r) for r in dir(reasons) if not r.startswith("_")]
)

KSPreasons = _make_reasons(PETSc.KSP.ConvergedReason())

class KSP:
def __init__(
self,
Expand Down Expand Up @@ -334,7 +334,7 @@ def munge(keys):
new[option] = value
return new

except:
except ImportError:

class KSP:
def __init__(
Expand Down

0 comments on commit 9e1ff3e

Please sign in to comment.