Skip to content

Commit d672fa8

Browse files
authored
Fix mypy checks (typing.Optional) (#545)
* typing.Optional * flake
1 parent c007abd commit d672fa8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ffcx/compiler.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def _print_timing(stage: int, timing: float):
8181

8282
def compile_ufl_objects(ufl_objects: typing.List[typing.Any],
8383
object_names: typing.Dict = {},
84-
prefix: str = None,
84+
prefix: typing.Optional[str] = None,
8585
options: typing.Dict = {},
8686
visualise: bool = False):
8787
"""Generate UFC code for a given UFL objects.

ffcx/element_interface.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ class QuadratureElement(basix.ufl_wrapper._BasixElementBase):
108108
_cellname: str
109109

110110
def __init__(
111-
self, cellname: str, value_shape: typing.Tuple[int, ...], scheme: str = None, degree: int = None,
112-
points: basix.ufl_wrapper._nda_f64 = None, weights: basix.ufl_wrapper._nda_f64 = None,
113-
mapname: str = "identity"
111+
self, cellname: str, value_shape: typing.Tuple[int, ...], scheme: typing.Optional[str] = None,
112+
degree: typing.Optional[int] = None, points: typing.Optional[basix.ufl_wrapper._nda_f64] = None,
113+
weights: typing.Optional[basix.ufl_wrapper._nda_f64] = None, mapname: str = "identity"
114114
):
115115
"""Initialise the element."""
116116
if scheme is not None:

0 commit comments

Comments
 (0)