Showing 51 of 57 total issues
Function get_ancillary_filepath
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_ancillary_filepath(
Function _is_balanced
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def _is_balanced(cls, template: str):
stack: list[str] = []
for char in template:
if char in "{[":
stack.append("}" if char == "{" else "]")
- 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 convert
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def convert(
Function convert
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def convert(
Function __init__
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, input_key: str):
kwargs: Dict[str, str] = {}
if len(input_key.split("::")) == 3:
logger.warning(
- 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 select_parameters
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def select_parameters(self, input_key: str) -> Dict[str, Dict[str, Any]]:
selected_params: Dict[str, Dict[str, Any]] = {
"alignment": {},
"range": {},
"width": {},
- 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 deeply nested control flow statements. Open
if data_var_data[name].equals(xr.DataArray([])):
logger.warning(
"Input key matched regex pattern but no matching variable"
" could be found in the input dataset. A value of"
" xr.DataArray([]) will be used instead.\n"
Function _write_transform_parameter_row
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _write_transform_parameter_row(
Function _find_data
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _find_data(
Avoid deeply nested control flow statements. Open
if not coord_data[name].equals(xr.DataArray([])):
variable_retriever.source = input_key
selected_coord_rules[name] = variable_retriever
Function _find_data
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _find_data(
Function fetch_data
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def fetch_data(
Function retrieve
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def retrieve(
Function _create_bounds
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _create_bounds(
coordinate: xr.DataArray,
alignment: Literal["LEFT", "RIGHT", "CENTER"],
width: str,
) -> xr.DataArray:
- 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 fetch_data
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def fetch_data(
Function last_modified
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def last_modified(self, datastream: str) -> Union[datetime, None]:
"""Returns the datetime of the last modification to the datastream's storage area."""
substitutions = get_fields_from_datastream(datastream)
substitutions["datastream"] = datastream
prefix = self._get_data_directory(substitutions).as_posix()
- 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
Consider simplifying this complex logical expression. Open
if (
retrieved_dataset is not None
and input_key is not None
and retriever is not None
and retriever.parameters is not None
Function convert
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def convert(
Function convert
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def convert(
Function convert
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def convert(