Showing 56 of 56 total issues
Function transform_lon_lats
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def transform_lon_lats(
Function write_nodes
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def write_nodes(
Function makeVersionChunk
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def makeVersionChunk(self, first=False):
data = []
# version
data.append(int2str(1))
# timestamp = self.timestamp or 0, if self.timestamp, write changeset and
- 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
Avoid too many return
statements within this function. Open
return None
Avoid too many return
statements within this function. Open
return True, True
Function get_transform
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_transform(
file_proj: osr.SpatialReference, reverse=False
) -> TransformFunType | None:
"""
Returns a function to transform coordinate system of a list of points,
- 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_hgt_filename
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def parse_hgt_filename(
filename: str,
corrx: float,
corry: float,
) -> BBox:
- 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 a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def __init__(
self,
fName: str,
osmVersion: float,
pyhgtmap_version: str,
- 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 check_cached_file
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def check_cached_file(self, file_name: str, resolution: int) -> None:
"""
Check HGT file exists and its size corresponds to current resolution.
Raises exception if not.
Only check existence of TIF file.
- 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 try_parallelizing
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def try_parallelizing(self, func: Callable, *args, **kwargs) -> None:
"""
Try to parallelize func over multiple processes if enabled, else execute in current process.
"""
if self.parallel and not self.single_output:
- 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_geotiff_bbox
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def parse_geotiff_bbox(
filename: str,
corrx: float,
corry: float,
doTransform: bool,
- 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 gdrive
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def gdrive(self) -> GoogleDrive:
"""Lazily connect to Google Drive API, using OAuth2."""
# Ensure config drectory exists
pathlib.Path(self.config_dir).mkdir(parents=True, exist_ok=True)
- 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 process_files
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def process_files(self, files: list[tuple[str, bool]]) -> None:
"""Main entry point of this class, processing a bunch of HGT files.
Args:
files (List[Tuple[str, bool]]): List of [source file name, check poly toggle]
- 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 parseSRTMv3CoverageKml
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def parseSRTMv3CoverageKml(kmlContents):
polygons = []
# KML file is pure XML
polygonSoup = BeautifulSoup(kmlContents, "lxml-xml").findAll("Polygon")
for p in polygonSoup:
- 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 download_missing_file
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def download_missing_file(
self,
area: str,
resolution: int,
output_file_name: str,
- 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 writeNodes
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def writeNodes(
output: Output,
tile_contours: TileContours,
timestampString, # dummy option
start_node_id,
- 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"