Skip to content

Extend typing checks to demos#4280

Open
schnellerhase wants to merge 20 commits into
mainfrom
schnellerhase/mypy-demo
Open

Extend typing checks to demos#4280
schnellerhase wants to merge 20 commits into
mainfrom
schnellerhase/mypy-demo

Conversation

@schnellerhase

@schnellerhase schnellerhase commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Extends mypy based type checking to Python demos.

@schnellerhase schnellerhase self-assigned this Jul 9, 2026
@schnellerhase schnellerhase added ci Continuous Integration type-hints labels Jul 9, 2026


@typing.overload
def extract_function_spaces(forms: Form, index: int = 0) -> FunctionSpace | None: ...
index: int = 0,
) -> FunctionSpace | list[None | FunctionSpace]:
forms: Sequence[Form], index: int = 0
) -> list[FunctionSpace | None]: ...
@typing.overload
def extract_function_spaces(
forms: Sequence[Sequence[Form]], index: int = 0
) -> list[list[FunctionSpace | None]]: ...
Comment thread python/dolfinx/plot.py
@overload
def vtk_mesh(
msh: mesh.Mesh, dim: int | None = None, entities: npt.NDArray[np.int32] | None = None
): ...
Comment thread python/dolfinx/plot.py


@overload
def vtk_mesh(V: fem.FunctionSpace, entities: npt.NDArray[np.int32] | None = None): ...
Comment thread python/pyproject.toml Outdated
@schnellerhase schnellerhase marked this pull request as ready for review July 9, 2026 17:52
@@ -1,5 +1,5 @@
basix_repository=FEniCS/basix
basix_ref=main
basix_ref=schnellerhase/mypy-dolfinx

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
basix_ref=schnellerhase/mypy-dolfinx
basix_ref=main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continuous Integration type-hints

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant