airbnb/caravel

View on GitHub

Showing 2,441 of 6,157 total issues

Function df_to_sql has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def df_to_sql(  # pylint: disable=too-many-locals
Severity: Minor
Found in superset/db_engine_specs/gsheets.py - About 35 mins to fix

    Function where_latest_partition has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def where_latest_partition(  # pylint: disable=unused-argument
    Severity: Minor
    Found in superset/db_engine_specs/base.py - About 35 mins to fix

      Function CSV_TO_HIVE_UPLOAD_DIRECTORY_FUNC has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def CSV_TO_HIVE_UPLOAD_DIRECTORY_FUNC(  # pylint: disable=invalid-name
      Severity: Minor
      Found in superset/config.py - About 35 mins to fix

        Function dataset_macro has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def dataset_macro(
        Severity: Minor
        Found in superset/jinja_context.py - About 35 mins to fix

          Function _get_data_response has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def _get_data_response(
          Severity: Minor
          Found in superset/charts/data/api.py - About 35 mins to fix

            Function _update_vm_datasources_access has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def _update_vm_datasources_access(  # pylint: disable=too-many-locals
            Severity: Minor
            Found in superset/security/manager.py - About 35 mins to fix

              Function get_time_filter has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def get_time_filter(
              Severity: Minor
              Found in superset/jinja_context.py - About 35 mins to fix

                Function import_datasource has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                def import_datasource(
                Severity: Minor
                Found in superset/commands/dataset/importers/v0.py - About 35 mins to fix

                  Function compute_thumbnails has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  def compute_thumbnails(
                  Severity: Minor
                  Found in superset/cli/thumbnails.py - About 35 mins to fix

                    Function sortAndFilterSeries has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                      rows: DataRecord[],
                      xAxis: string,
                      extraMetricLabels: any[],
                      sortSeriesType?: SortSeriesType,
                      sortSeriesAscending?: boolean,
                    Severity: Minor
                    Found in superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts - About 35 mins to fix

                      Function getMinAndMaxFromBounds has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                        axisType: AxisType,
                        truncateAxis: boolean,
                        min?: number,
                        max?: number,
                        seriesType?: EchartsTimeseriesSeriesType,
                      Severity: Minor
                      Found in superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts - About 35 mins to fix

                        Function sortRows has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                          rows: DataRecord[],
                          totalStackedValues: number[],
                          xAxis: string,
                          xAxisSortSeries: SortSeriesType,
                          xAxisSortSeriesAscending: boolean,
                        Severity: Minor
                        Found in superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts - About 35 mins to fix

                          Function _update_dataset_catalog_schema_perm has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              def _update_dataset_catalog_schema_perm(
                          Severity: Minor
                          Found in superset/security/manager.py - About 35 mins to fix

                            Function get_datasources_accessible_by_user has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                def get_datasources_accessible_by_user(  # pylint: disable=invalid-name
                            Severity: Minor
                            Found in superset/security/manager.py - About 35 mins to fix

                              Function getChartPadding has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                show: boolean,
                                orientation: LegendOrientation,
                                margin?: string | number | null,
                                padding?: { top?: number; bottom?: number; left?: number; right?: number },
                                isHorizontal?: boolean,
                              Severity: Minor
                              Found in superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts - About 35 mins to fix

                                Function createNewSlice has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                  can_add: boolean,
                                  can_download: boolean,
                                  can_overwrite: boolean,
                                  slice: Slice,
                                  form_data: QueryFormData,
                                Severity: Minor
                                Found in superset-frontend/src/explore/actions/exploreActions.ts - About 35 mins to fix

                                  Function getLayer has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                    formData: QueryFormData,
                                    payload: JsonObject,
                                    onAddFilter: () => void,
                                    setTooltip: (tooltip: TooltipProps['tooltip']) => void,
                                    datasource: Datasource,

                                    Function alterInArr has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                      state: Record<string, any>,
                                      arrKey: string,
                                      obj: Record<string, any>,
                                      alterations: Record<string, any>,
                                      idKey = 'id',
                                    Severity: Minor
                                    Found in superset-frontend/src/reduxUtils.ts - About 35 mins to fix

                                      Function fillNativeFilters has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                        filterConfig: FilterConfiguration,
                                        mergedDataMask: DataMaskStateWithId,
                                        draftDataMask: DataMaskStateWithId,
                                        initialDataMask?: DataMaskStateWithId,
                                        currentFilters?: Filters,
                                      Severity: Minor
                                      Found in superset-frontend/src/dataMask/reducer.ts - About 35 mins to fix

                                        Function sendBeacon has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                        Open

                                        const sendBeacon = events => {
                                          if (events.length <= 0) {
                                            return;
                                          }
                                        
                                        
                                        Severity: Minor
                                        Found in superset-frontend/src/middleware/loggerMiddleware.js - About 35 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