Skip to content

Add type annotations to computation.py#98

Open
arpitjain099 wants to merge 1 commit into
dbetchkal:mainfrom
arpitjain099:chore/type-hints-computation
Open

Add type annotations to computation.py#98
arpitjain099 wants to merge 1 commit into
dbetchkal:mainfrom
arpitjain099:chore/type-hints-computation

Conversation

@arpitjain099

Copy link
Copy Markdown
Contributor

Adds type annotations to all 11 functions in computation.py that were missing
parameter types, return types, or both. Also modernizes existing type imports
to use native Python 3.12+ syntax via from __future__ import annotations.

Changes:

  • Added return type annotations to expected_Lp, round_points, project_raster,
    ambience_from_nvspl, select_optimal, and normalize_point_density
  • Added full parameter + return annotations to contiguous_regions,
    audibility_to_interval, calculate_duration_summary, barometric_pressure,
    and atmospheric_absorption
  • Replaced Optional[int] with int | None, Tuple[...] with tuple[...]
    in build_src_point_mesh, create_overlapping_mesh, and compute_fbeta
  • Removed unused List, Optional, Tuple from the typing import

This follows the same pattern as #91 for layered_active_space.py. No runtime
behavior changes, only annotations.

Annotate all 11 unannotated or partially-annotated functions with
parameter and return types. Modernize existing typing imports to use
native Python 3.12+ syntax (tuple instead of Tuple, X | None instead
of Optional[X]) via `from __future__ import annotations`.

Signed-off-by: arpitjain099 <arpitjain099@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant