airbnb/caravel

View on GitHub

Showing 2,441 of 6,157 total issues

Function explore has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    def explore(
        self,
        datasource_type: str | None = None,
        datasource_id: int | None = None,
        key: str | None = None,
Severity: Minor
Found in superset/views/core.py - About 1 hr to fix

    Function getLegendProps has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export function getLegendProps(
      type: LegendType,
      orientation: LegendOrientation,
      show: boolean,
      theme: SupersetTheme,
    Severity: Minor
    Found in superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts - About 1 hr to fix

      Function outlierData has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

            metricLabels.map(metric => {
              const groupbyLabel = extractGroupbyLabel({
                datum,
                groupby: groupbyLabels,
                coltypeMapping,

        Function constructor has 35 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          constructor() {
            super({
              buildQuery,
              controlPanel,
              loadChart: () => import('../../EchartsTimeseries'),

          Function constructor has 35 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            constructor() {
              super({
                buildQuery,
                controlPanel,
                loadChart: () => import('../EchartsTimeseries'),

            Function getCrossFilterDataMask has 35 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              (value: string) => {
                const selected = Object.values(selectedValues);
                let values: string[];
                if (selected.includes(value)) {
                  values = selected.filter(v => v !== value);

              Function formatter has 35 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                const formatter = (params: CallbackDataParams) => {
                  const [name, formattedValue, formattedPercent] = parseParams({
                    params,
                    numberFormatter,
                  });

                Function onOperatorChange has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  const onOperatorChange = (operatorId: Operators) => {
                    const currentComparator = props.adhocFilter.comparator;
                    let newComparator;
                    // convert between list of comparators and individual comparators
                    // (e.g. `in ('North America', 'Africa')` to `== 'North America'`)

                  Function loadTags has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export const loadTags = async (
                    search: string,
                    page: number,
                    pageSize: number,
                  ) => {
                  Severity: Minor
                  Found in superset-frontend/src/components/Tags/utils.tsx - About 1 hr to fix

                    Function loadOptions has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        async function loadOptions() {
                          const datasetId = Number(formData.datasource.split('__')[0]);
                          try {
                            setIsLoadingColumns(true);
                            let response: JsonResponse;
                    Severity: Minor
                    Found in superset-frontend/src/components/Chart/DrillBy/DrillByMenuItems.tsx - About 1 hr to fix

                      Function publishDataMask has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        async (
                          history,
                          dashboardId,
                          updateKey,
                          dataMaskSelected: DataMaskStateWithId,

                        Function extractExtras has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export default function extractExtras(formData: QueryFormData): ExtractedExtra {
                          const applied_time_extras: AppliedTimeExtras = {};
                          const filters: QueryObjectFilterClause[] = [];
                          const extras: QueryObjectExtras = {};
                          const extract: ExtractedExtra = {

                          Function parsePostForm has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export default function parsePostForm(requestBody: ArrayBuffer) {
                            type ParsedFields = Record<string, string[] | string>;
                            if (requestBody.constructor.name !== 'ArrayBuffer') {
                              return requestBody;
                            }
                          Severity: Minor
                          Found in superset-frontend/cypress-base/cypress/utils/parsePostForm.ts - About 1 hr to fix

                            Function mountIframe has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              async function mountIframe(): Promise<Switchboard> {
                                return new Promise(resolve => {
                                  const iframe = document.createElement('iframe');
                                  const dashboardConfigUrlParams = dashboardUiConfig ? {uiConfig: `${calculateConfig()}`} : undefined;
                                  const filterConfig = dashboardUiConfig?.filters || {}
                            Severity: Minor
                            Found in superset-embedded-sdk/src/index.ts - About 1 hr to fix

                              Function mapStateToProps has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  mapStateToProps: (state: ControlPanelState, controlState: ControlState) => {
                                    const { controls, datasource } = state;
                                    const dataset = isDataset(datasource) ? datasource : undefined;
                                    const columns = [controls?.x_axis?.value as QueryFormColumn].filter(
                                      Boolean,

                                Function applyEnvOverrides has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function applyEnvOverrides(config: ConfigType): ConfigType {
                                  const envVarConfigSetter: { [envVar: string]: (val: string) => void } = {
                                    PORT: val => (config.port = toNumber(val)),
                                    LOG_LEVEL: val => (config.logLevel = val),
                                    LOG_TO_FILE: val => (config.logToFile = toBoolean(val)),
                                Severity: Minor
                                Found in superset-websocket/src/config.ts - About 1 hr to fix

                                  Function log has 11 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                      def log(  # pylint: disable=too-many-arguments
                                  Severity: Major
                                  Found in superset/utils/log.py - About 1 hr to fix

                                    Function log has 11 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                        def log(  # pylint: disable=too-many-arguments
                                    Severity: Major
                                    Found in superset/utils/log.py - About 1 hr to fix

                                      Function pivot has 11 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                      def pivot(  # pylint: disable=too-many-arguments
                                      Severity: Major
                                      Found in superset/utils/pandas_postprocessing/pivot.py - About 1 hr to fix

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

                                            def __init__(  # pylint: disable=too-many-arguments
                                        Severity: Major
                                        Found in superset/common/query_context.py - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language