Skip to content

Fix type hints: compute_face_areas order param and return type #1590

Closed

Description

@rajeeja

Noted by @Sevans711 during review of #1577 — these issues already exist on main, not introduced by #1577.

  1. compute_face_areas and related signatures use order: int | None = 4 (or Optional[int]) but None is not a valid value — should be order: int = 4.
  2. Return type annotation missing on compute_face_areas.

Narrow cleanup PR welcome.

Activity

  1. added
    documentation
    on Jul 20, 2026
  2. Sevans711 commented on Jul 20, 2026

    @Sevans711
    Collaborator

    Similarly, the other kwargs include None as an option but None is not a valid value. For example, quadrature_rule: str | None = "triangular" should be quadrature_rule: str = "triangular", and latitude_adjusted_area: bool | None = False should be latitude_adjusted_area: bool = False.

    Actually, a quick search for the string "| None = " throughout the codebase reveals many similar issues with allowing None when it should not be allowed because the code does not handle it. I will open a separate issue for that, so that this one can remain narrowly focused on face_areas related type hinting.

  3. moved this from 📚 Backlog to ✅ Done in UXarray Developmenton Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentation

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions