Skip to content

Simplify assemble routines#4241

Open
schnellerhase wants to merge 6 commits into
mainfrom
schnellerhase/assemble
Open

Simplify assemble routines#4241
schnellerhase wants to merge 6 commits into
mainfrom
schnellerhase/assemble

Conversation

@schnellerhase

Copy link
Copy Markdown
Contributor
  • Removes deprecated assemble.set_bc (Deprecated for 20 months)
  • Switch assignment logic for default (breaking typing) from x = y if x is None else x to if x is None: x = y
  • Add overload typing stubs for blocked case handling/differentiation
  • Remove additional callable inside packing functionality (recurse on function itself)

@schnellerhase schnellerhase self-assigned this Jun 15, 2026
@schnellerhase schnellerhase added housekeeping Tidying and style improvements type-hints python Pull requests that update Python code labels Jun 15, 2026
@schnellerhase schnellerhase force-pushed the schnellerhase/assemble branch from 5f1921b to e7b4f12 Compare June 15, 2026 12:54
@schnellerhase schnellerhase marked this pull request as ready for review June 15, 2026 12:58
form: Form | Sequence[Form],
) -> npt.NDArray | Sequence[npt.NDArray]:
@typing.overload
def pack_constants(form: Form) -> npt.NDArray: ...


@typing.overload
def pack_constants(form: Sequence[Form]) -> list[npt.NDArray]: ...

return _pack(form)
@typing.overload
def pack_coefficients(form: None | Form) -> dict[tuple[IntegralType, int], npt.NDArray]: ...
dict[tuple[IntegralType, int], npt.NDArray] | list[dict[tuple[IntegralType, int], npt.NDArray]]
):
form: Sequence[Form],
) -> list[dict[tuple[IntegralType, int], npt.NDArray]]: ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

housekeeping Tidying and style improvements python Pull requests that update Python code type-hints

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants