abhioncbr/docker-airflow

View on GitHub

Showing 312 of 1,025 total issues

Airflow has 39 functions (exceeds 20 allowed). Consider refactoring.
Open

class Airflow(BaseView):
    def is_visible(self):
        return False

    @expose('/')
Severity: Minor
Found in airflowPatch1.10/views.py - About 5 hrs to fix

    Airflow has 38 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Airflow(BaseView):
        def is_visible(self):
            return False
    
        @expose('/')
    Severity: Minor
    Found in airflowPatch1.9/views.py - About 5 hrs to fix

      Airflow has 36 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class Airflow(BaseView):
      
          def is_visible(self):
              return False
      
      
      Severity: Minor
      Found in airflowPatch1.8/views.py - About 4 hrs to fix

        Function __init__ has 37 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def __init__(
        Severity: Major
        Found in airflowPatch1.10/models.py - About 4 hrs to fix

          TaskInstance has 33 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class TaskInstance(Base):
              """
              Task instances store the state of a task instance. This table is the
              authority and single source of truth around what tasks have run and the
              state they are in.
          Severity: Minor
          Found in airflowPatch1.8/models.py - About 4 hrs to fix

            Function __init__ has 33 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def __init__(
            Severity: Major
            Found in airflowPatch1.9/models.py - About 4 hrs to fix

              Function task has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
              Open

                  def task(self):
                      TI = models.TaskInstance
              
                      dag_id = request.args.get('dag_id')
                      task_id = request.args.get('task_id')
              Severity: Minor
              Found in airflowPatch1.9/views.py - About 4 hrs 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 task has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
              Open

                  def task(self):
                      TI = models.TaskInstance
              
                      dag_id = request.args.get('dag_id')
                      task_id = request.args.get('task_id')
              Severity: Minor
              Found in airflowPatch1.10/views.py - About 4 hrs 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 collect_dags has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
              Open

                  def collect_dags(
                          self,
                          dag_folder=None,
                          only_if_updated=True):
                      """
              Severity: Minor
              Found in airflowPatch1.9/models.py - About 4 hrs 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 task has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
              Open

                  def task(self):
                      TI = models.TaskInstance
              
                      dag_id = request.args.get('dag_id')
                      task_id = request.args.get('task_id')
              Severity: Minor
              Found in airflowPatch1.8/views.py - About 4 hrs 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 collect_dags has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
              Open

                  def collect_dags(
                          self,
                          dag_folder=None,
                          only_if_updated=True):
                      """
              Severity: Minor
              Found in airflowPatch1.8/models.py - About 4 hrs 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 __init__ has 32 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def __init__(
              Severity: Major
              Found in airflowPatch1.8/models.py - About 4 hrs to fix

                Function run has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
                Open

                    def run(
                            self,
                            verbose=True,
                            ignore_all_deps=False,
                            ignore_depends_on_past=False,
                Severity: Minor
                Found in airflowPatch1.8/models.py - About 3 hrs 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 _run_raw_task has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
                Open

                    def _run_raw_task(
                            self,
                            mark_success=False,
                            test_mode=False,
                            job_id=None,
                Severity: Minor
                Found in airflowPatch1.9/models.py - About 3 hrs 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 _run_raw_task has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
                Open

                    def _run_raw_task(
                            self,
                            mark_success=False,
                            test_mode=False,
                            job_id=None,
                Severity: Minor
                Found in airflowPatch1.10/models.py - About 3 hrs 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 index has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
                Open

                    def index(self):
                        session = Session()
                        DM = models.DagModel
                
                        # restrict the dags shown if filter_by_owner and current user is not superuser
                Severity: Minor
                Found in airflowPatch1.9/views.py - About 3 hrs 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 index has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
                Open

                    def index(self, session=None):
                        DM = models.DagModel
                
                        # restrict the dags shown if filter_by_owner and current user is not superuser
                        do_filter = FILTER_BY_OWNER and (not current_user.is_superuser())
                Severity: Minor
                Found in airflowPatch1.10/views.py - About 3 hrs 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 log has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                Open

                    def log(self):
                        BASE_LOG_FOLDER = os.path.expanduser(
                            conf.get('core', 'BASE_LOG_FOLDER'))
                        dag_id = request.args.get('dag_id')
                        task_id = request.args.get('task_id')
                Severity: Minor
                Found in airflowPatch1.8/views.py - About 3 hrs 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 landing_times has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                Open

                    def landing_times(self, session=None):
                        default_dag_run = conf.getint('webserver', 'default_dag_run_display_number')
                        dag_id = request.args.get('dag_id')
                        dag = dagbag.get_dag(dag_id)
                        base_date = request.args.get('base_date')
                Severity: Minor
                Found in airflowPatch1.10/views.py - About 2 hrs 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 __init__ has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                Open

                    def __init__(
                            self,
                            task_id,
                            owner=configuration.conf.get('operators', 'DEFAULT_OWNER'),
                            email=None,
                Severity: Minor
                Found in airflowPatch1.10/models.py - About 2 hrs 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