Skip to content

Commit

Permalink
Flake8 + mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgensd committed Nov 19, 2023
1 parent 5e893bf commit 5132a7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/dolfinx_mpc/assemble_vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@


def apply_lifting(b: _PETSc.Vec, form: List[_fem.Form], bcs: List[List[_fem.DirichletBC]], # type: ignore
constraint: MultiPointConstraint, x0: List[_PETSc.Vec] = [],
constraint: MultiPointConstraint, x0: List[_PETSc.Vec] = [], # type: ignore
scale: _float_classes = default_scalar_type(1.0)): # type: ignore
"""
Apply lifting to vector b, i.e.
Expand All @@ -36,7 +36,7 @@ def apply_lifting(b: _PETSc.Vec, form: List[_fem.Form], bcs: List[List[_fem.Diri
scale: Scaling for lifting
"""
if isinstance(scale, numpy.generic): # nanobind conversion of numpy dtypes to general Python types
scale = scale.item()
scale = scale.item() # type: ignore
t = Timer("~MPC: Apply lifting (C++)")
with contextlib.ExitStack() as stack:
x0 = [stack.enter_context(x.localForm()) for x in x0]
Expand Down

0 comments on commit 5132a7d

Please sign in to comment.