diff --git a/semeio/workflows/localisation/local_script_lib.py b/semeio/workflows/localisation/local_script_lib.py index 2c4a2aab2..9d1111ebf 100644 --- a/semeio/workflows/localisation/local_script_lib.py +++ b/semeio/workflows/localisation/local_script_lib.py @@ -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 @@ -26,6 +26,10 @@ debug_print, ) +try: + from typing import Self +except ImportError: + from typing_extensions import Self @dataclass class Parameter: @@ -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: @@ -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, @@ -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 @@ -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 """