abhioncbr/docker-airflow

View on GitHub

Showing 312 of 1,025 total issues

File models.py has 4431 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
Severity: Major
Found in airflowPatch1.10/models.py - About 1 wk to fix

    File models.py has 4049 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    # -*- coding: utf-8 -*-
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    Severity: Major
    Found in airflowPatch1.9/models.py - About 1 wk to fix

      File models.py has 3567 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      # -*- coding: utf-8 -*-
      #
      # Licensed under the Apache License, Version 2.0 (the "License");
      # you may not use this file except in compliance with the License.
      # You may obtain a copy of the License at
      Severity: Major
      Found in airflowPatch1.8/models.py - About 1 wk to fix

        File views.py has 2473 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        # -*- coding: utf-8 -*-
        #
        # Licensed to the Apache Software Foundation (ASF) under one
        # or more contributor license agreements.  See the NOTICE file
        # distributed with this work for additional information
        Severity: Major
        Found in airflowPatch1.10/views.py - About 6 days to fix

          File views.py has 2355 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          # -*- coding: utf-8 -*-
          #
          # Licensed under the Apache License, Version 2.0 (the "License");
          # you may not use this file except in compliance with the License.
          # You may obtain a copy of the License at
          Severity: Major
          Found in airflowPatch1.9/views.py - About 6 days to fix

            File views.py has 2217 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            # -*- coding: utf-8 -*-
            #
            # Licensed under the Apache License, Version 2.0 (the "License");
            # you may not use this file except in compliance with the License.
            # You may obtain a copy of the License at
            Severity: Major
            Found in airflowPatch1.8/views.py - About 6 days to fix

              Function process_file has a Cognitive Complexity of 73 (exceeds 5 allowed). Consider refactoring.
              Open

                  def process_file(self, filepath, only_if_updated=True, safe_mode=True):
                      """
                      Given a path to a python module or zip file, this method imports
                      the module and look for dag objects within it.
                      """
              Severity: Minor
              Found in airflowPatch1.10/models.py - About 1 day 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

              DAG has 67 functions (exceeds 20 allowed). Consider refactoring.
              Open

              class DAG(BaseDag, LoggingMixin):
                  """
                  A dag (directed acyclic graph) is a collection of tasks with directional
                  dependencies. A dag also has a schedule, a start end an end date
                  (optional). For each schedule, (say daily or hourly), the DAG needs to run
              Severity: Major
              Found in airflowPatch1.10/models.py - About 1 day to fix

                DAG has 64 functions (exceeds 20 allowed). Consider refactoring.
                Open

                class DAG(BaseDag, LoggingMixin):
                    """
                    A dag (directed acyclic graph) is a collection of tasks with directional
                    dependencies. A dag also has a schedule, a start end an end date
                    (optional). For each schedule, (say daily or hourly), the DAG needs to run
                Severity: Major
                Found in airflowPatch1.9/models.py - About 1 day to fix

                  DAG has 61 functions (exceeds 20 allowed). Consider refactoring.
                  Open

                  class DAG(BaseDag, LoggingMixin):
                      """
                      A dag (directed acyclic graph) is a collection of tasks with directional
                      dependencies. A dag also has a schedule, a start end an end date
                      (optional). For each schedule, (say daily or hourly), the DAG needs to run
                  Severity: Major
                  Found in airflowPatch1.8/models.py - About 1 day to fix

                    Function process_file has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def process_file(self, filepath, only_if_updated=True, safe_mode=True):
                            """
                            Given a path to a python module or zip file, this method imports
                            the module and look for dag objects within it.
                            """
                    Severity: Minor
                    Found in airflowPatch1.9/models.py - About 1 day 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 process_file has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def process_file(self, filepath, only_if_updated=True, safe_mode=True):
                            """
                            Given a path to a python module or zip file, this method imports
                            the module and look for dag objects within it.
                            """
                    Severity: Minor
                    Found in airflowPatch1.8/models.py - About 1 day 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

                    BaseOperator has 47 functions (exceeds 20 allowed). Consider refactoring.
                    Open

                    class BaseOperator(LoggingMixin):
                        """
                        Abstract base class for all operators. Since operators create objects that
                        become nodes in the dag, BaseOperator contains many recursive methods for
                        dag crawling behavior. To derive this class, you are expected to override
                    Severity: Minor
                    Found in airflowPatch1.10/models.py - About 6 hrs to fix

                      Function chart_data has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def chart_data(self):
                              from airflow import macros
                              import pandas as pd
                              if conf.getboolean('core', 'secure_mode'):
                                  abort(404)
                      Severity: Minor
                      Found in airflowPatch1.10/views.py - About 6 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 chart_data has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def chart_data(self):
                              from airflow import macros
                              import pandas as pd
                              session = settings.Session()
                              chart_id = request.args.get('chart_id')
                      Severity: Minor
                      Found in airflowPatch1.9/views.py - About 6 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 chart_data has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def chart_data(self):
                              from airflow import macros
                              import pandas as pd
                              session = settings.Session()
                              chart_id = request.args.get('chart_id')
                      Severity: Minor
                      Found in airflowPatch1.8/views.py - About 6 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

                      BaseOperator has 44 functions (exceeds 20 allowed). Consider refactoring.
                      Open

                      class BaseOperator(LoggingMixin):
                          """
                          Abstract base class for all operators. Since operators create objects that
                          become node in the dag, BaseOperator contains many recursive methods for
                          dag crawling behavior. To derive this class, you are expected to override
                      Severity: Minor
                      Found in airflowPatch1.9/models.py - About 6 hrs to fix

                        BaseOperator has 44 functions (exceeds 20 allowed). Consider refactoring.
                        Open

                        class BaseOperator(object):
                            """
                            Abstract base class for all operators. Since operators create objects that
                            become node in the dag, BaseOperator contains many recursive methods for
                            dag crawling behavior. To derive this class, you are expected to override
                        Severity: Minor
                        Found in airflowPatch1.8/models.py - About 6 hrs to fix

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

                          class TaskInstance(Base, LoggingMixin):
                              """
                              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.10/models.py - About 5 hrs to fix

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

                            class TaskInstance(Base, LoggingMixin):
                                """
                                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.9/models.py - About 5 hrs to fix
                              Severity
                              Category
                              Status
                              Source
                              Language