abhioncbr/docker-airflow

View on GitHub

Showing 312 of 1,025 total issues

Avoid too many return statements within this function.
Open

                return RedisHook(redis_conn_id=self.conn_id)
Severity: Major
Found in airflowPatch1.10/models.py - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                    return DockerHook(docker_conn_id=self.conn_id)
    Severity: Major
    Found in airflowPatch1.10/models.py - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                      return CloudantHook(cloudant_conn_id=self.conn_id)
      Severity: Major
      Found in airflowPatch1.10/models.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                        return JdbcHook(jdbc_conn_id=self.conn_id)
        Severity: Major
        Found in airflowPatch1.8/models.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                          return SqliteHook(sqlite_conn_id=self.conn_id)
          Severity: Major
          Found in airflowPatch1.8/models.py - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                                            return found_dags
            Severity: Major
            Found in airflowPatch1.8/models.py - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                      return found_dags
              Severity: Major
              Found in airflowPatch1.8/models.py - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                                return JiraHook(jira_conn_id=self.conn_id)
                Severity: Major
                Found in airflowPatch1.8/models.py - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                                  return VerticaHook(vertica_conn_id=self.conn_id)
                  Severity: Major
                  Found in airflowPatch1.8/models.py - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                    return PrestoHook(presto_conn_id=self.conn_id)
                    Severity: Major
                    Found in airflowPatch1.8/models.py - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                      return OracleHook(oracle_conn_id=self.conn_id)
                      Severity: Major
                      Found in airflowPatch1.8/models.py - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                        return CloudantHook(cloudant_conn_id=self.conn_id)
                        Severity: Major
                        Found in airflowPatch1.8/models.py - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                          return HiveServer2Hook(hiveserver2_conn_id=self.conn_id)
                          Severity: Major
                          Found in airflowPatch1.8/models.py - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                            return MsSqlHook(mssql_conn_id=self.conn_id)
                            Severity: Major
                            Found in airflowPatch1.8/models.py - About 30 mins to fix

                              Function get_val has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def get_val(self):
                                      if self._val and self.is_encrypted:
                                          try:
                                              fernet = get_fernet()
                                          except:
                              Severity: Minor
                              Found in airflowPatch1.9/models.py - About 25 mins to fix

                              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 resolve_template_files has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def resolve_template_files(self):
                                      # Getting the content of files for template_field / template_ext
                                      for attr in self.template_fields:
                                          content = getattr(self, attr)
                                          if content is not None and \
                              Severity: Minor
                              Found in airflowPatch1.9/models.py - About 25 mins to fix

                              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 has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def create(dag_id, session=None):
                                      """
                                      Creates the missing states the stats table for the dag specified
                              
                                      :param dag_id: dag id of the dag to create stats for
                              Severity: Minor
                              Found in airflowPatch1.9/models.py - About 25 mins to fix

                              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 get_failed_dep_statuses has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def get_failed_dep_statuses(
                                          self,
                                          dep_context=None,
                                          session=None):
                                      dep_context = dep_context or DepContext()
                              Severity: Minor
                              Found in airflowPatch1.9/models.py - About 25 mins to fix

                              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 __hash__ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def __hash__(self):
                                      hash_components = [type(self)]
                                      for c in self._comps:
                                          # task_ids returns a list and lists can't be hashed
                                          if c == 'task_ids':
                              Severity: Minor
                              Found in airflowPatch1.9/models.py - About 25 mins to fix

                              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 are_dependencies_met has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def are_dependencies_met(
                                          self,
                                          dep_context=None,
                                          session=None,
                                          verbose=False):
                              Severity: Minor
                              Found in airflowPatch1.9/models.py - About 25 mins to fix

                              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

                              Severity
                              Category
                              Status
                              Source
                              Language