Showing 93 of 93 total issues
Avoid deeply nested control flow statements. Open
for k, v in secret_data.items():
self._replace_dict_key(object_details, k, v)
Avoid deeply nested control flow statements. Open
if (airbyte_schema == schema or not airbyte_schema) and conn.get(
"connectionId"
) not in connection_ids:
connection_ids.append(conn["connectionId"])
if connection_ids:
Function integrated
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def integrated(self):
"""
Returns the values read from the config file plus the overrides from cli flags
"""
config_copy = self._config.dict()
- 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 main
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def main(parser: argparse.ArgumentParser = parser, test_cli_args: List[str] = list()) -> int:
tracking.do_not_track()
exit_code = 0
cli_args = test_cli_args or []
- 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 list_from_dbt_ls
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def list_from_dbt_ls(self, output):
user_selectors = list()
if self.get_config_value("select"):
user_selectors.append("--select")
user_selectors.append(self.get_config_value("select"))
- 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 render_templates
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def render_templates(self, relation, columns, destination, options=None, json_cols=None):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function print_row
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def print_row(
Function api_call
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def api_call(
Function render_property_file
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def render_property_file(self, template, context, model_yml, templates_folder):
Function generate_or_append_metadata
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def generate_or_append_metadata(self, relation, destination, options, action, existing_rows):
Function new_object_exists_in_current_yml
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def new_object_exists_in_current_yml(
Function update_connector_table_config
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def update_connector_table_config(
Function _create_or_update_source
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _create_or_update_source(self, exported_json_data):
"""
Decide whether creating or updating an existing source\
(if it's name corresponds to an existing name in JSON exported configuration)
"""
- 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 _create_or_update_connection
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _create_or_update_connection(self, connection_json: dict):
"""
Identify source_id and destination_id by their names
Update or create connection
"""
- 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 dbt_init
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def dbt_init(self, config_folder=None):
if not config_folder:
config_folder = self.get_config_folder(mandatory=False)
if config_folder:
- 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 _create_or_update_destination
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _create_or_update_destination(self, exported_json_data):
"""
Decide whether creating or updating an existing destination
(if it's name corresponds to an existing name in JSON exported configuration)
"""
- 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 run
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def run(self):
ymls_path = self.get_config_value("yml_path")
dags_path = self.get_config_value("dags_path")
if not (ymls_path and dags_path):
raise MissingArgumentException(["--yml-path", "--dags-path"], self.coves_config)
- 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 exit_code