Skip to content

Commit

Permalink
Type annotation in local_script_lib.py
Browse files Browse the repository at this point in the history
  • Loading branch information
oddvarlia committed Dec 17, 2023
1 parent 656d573 commit 8cddcf2
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions semeio/workflows/localisation/local_script_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import math
from collections import defaultdict
from dataclasses import dataclass, field
from typing import Dict, List
from typing import Dict, List, Any

import cwrap
import numpy as np
Expand All @@ -26,6 +26,10 @@
debug_print,
)

try:
from typing import Self
except ImportError:
from typing_extensions import Self

@dataclass
class Parameter:
Expand Down Expand Up @@ -262,7 +266,7 @@ def write_qc_parameter_surface(
reference_surface_file: str,
param_for_surface: object,
log_level=LogLevel.OFF,
):
)->None:
# pylint: disable=too-many-arguments

if param_for_surface is None or surface_scale is None:
Expand Down Expand Up @@ -365,8 +369,9 @@ def build_decay_object(
grid: object,
use_cutoff: bool,
tapering_range: float = 1.5,
) -> Decay:
) -> Any:
# pylint: disable=too-many-arguments
decay_obj = None
if method == "gaussian_decay":
decay_obj = GaussianDecay(
ref_pos,
Expand Down Expand Up @@ -463,7 +468,7 @@ def apply_decay(
perp_range: float,
azimuth: float,
use_cutoff: bool = False,
tapering_range: float = None,
tapering_range: float = 1.5,
calculate_qc_parameter: bool = False,
):
# pylint: disable=too-many-arguments,too-many-locals
Expand Down Expand Up @@ -507,7 +512,7 @@ def apply_constant(
grid: object,
value: float,
log_level: LogLevel,
calculate_qc_parameter=False,
calculate_qc_parameter: bool = False,
):
# pylint: disable=too-many-arguments,too-many-locals
"""
Expand Down

0 comments on commit 8cddcf2

Please sign in to comment.