Showing 50 of 50 total issues
Function save_raster
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def save_raster(
file_name: Union[str, Path],
value_array: np.ndarray,
crs: Union[CRS, int],
coordinate_array: Optional[np.ndarray] = None,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function from_binary
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
def from_binary(
Function __init__
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function __raster_calc_by_pixel__
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def __raster_calc_by_pixel__(
self,
raster: "Raster",
operator: Callable[[Any, Any], Any],
) -> np.ndarray:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function parse_slicer
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def parse_slicer(key: Union[int, slice, None], length: int) -> int:
if key is None:
start = 0
elif isinstance(key, int):
start = key if key > 0 else length + key
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _idw
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def _idw(
Function idw
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def idw(
Function _idw_array
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def _idw_array(
Function _idw_file
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def _idw_file(
file_name: str,
spatial_res: Tuple[float, float],
epsg: Optional[int] = None,
column_name: Optional[str] = None,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _idw_file
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def _idw_file(
Function _idw_file_path
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def _idw_file_path(
Function split2tiles
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def split2tiles(
self, tile_size: Union[int, Tuple[int, int], List[int]]
) -> Generator[Tuple[int, int, "Raster"], None, None]:
"""
Split raster into smaller tiles, excessive will be padded and have no data value
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function __nb_raster_calc__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __nb_raster_calc__(
Function save_raster
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def save_raster(
Function idw_single
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def idw_single(
Function _vincenty_distance
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _vincenty_distance(
long_lat1: np.ndarray,
long_lat2: np.ndarray,
semi_major: float = 6378137.0,
semi_minor: float = 6356752.314245179,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _vincenty_distance_dispatch
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _vincenty_distance_dispatch(
Function __raster_calculation__
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def __raster_calculation__(
self,
raster: Union[int, float, "Raster", np.ndarray],
operator: Callable[[Any, Any], Any],
) -> "Raster":
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function drape2raster
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def drape2raster(