Skip to content

Commit

Permalink
fix typing
Browse files Browse the repository at this point in the history
Signed-off-by: EstherLerouzic <[email protected]>
Change-Id: I0f1621b669b4db833d0760368cd834f3186ee2db
  • Loading branch information
EstherLerouzic committed Nov 27, 2024
1 parent 1ec64e4 commit 4c37ded
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions gnpy/core/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from __future__ import annotations
from collections import namedtuple
from collections.abc import Iterable
from typing import Union, List
from typing import Union, List, Optional
from dataclasses import dataclass
from numpy import argsort, mean, array, append, ones, ceil, any, zeros, outer, full, ndarray, asarray

Expand Down Expand Up @@ -325,7 +325,7 @@ def is_in_band(frequency: float, band: dict) -> bool:
return False


def demuxed_spectral_information(input_si: SpectralInformation, band: dict) -> SpectralInformation:
def demuxed_spectral_information(input_si: SpectralInformation, band: dict) -> Optional[SpectralInformation]:
"""extract a si based on band
"""
filtered_indices = [i for i, f in enumerate(input_si.frequency)
Expand Down
2 changes: 1 addition & 1 deletion gnpy/core/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def compute_band_power_deviation_and_tilt(srs_power_deviation, design_bands: dic
return deviation_db, tilt_target


def compute_tilt_using_previous_and_next_spans(prev_node, next_node, design_bands: List[str],
def compute_tilt_using_previous_and_next_spans(prev_node, next_node, design_bands: Dict[str, float],
input_powers: Dict[str, float], equipment: dict, network: DiGraph, prev_weight: float = 1.0,
next_weight: float = 0) -> Tuple[Dict[str, float], Dict[str, float]]:
"""Compute the power deviation per band and the tilt target based on previous and next spans.
Expand Down

0 comments on commit 4c37ded

Please sign in to comment.