airbnb/caravel

View on GitHub

Showing 3,672 of 6,072 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

dataProvider.argTypes = {
  host: {
    control: 'text',
    description: 'Set Superset App host for CORS request',
  },
superset-frontend/packages/superset-ui-demo/storybook/shared/components/createQuery.story.tsx on lines 99..108

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 97.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  story.argTypes = {
    host: {
      control: 'text',
      description: 'Superset App host for CORS request',
    },
superset-frontend/packages/superset-ui-demo/storybook/stories/superset-ui-chart/ChartDataProvider.stories.tsx on lines 128..141

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 97.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

export const basic = ({ width, height }: { width: string; height: string }) => (
  <SuperChart
    chartType={ChartKeys.DILIGENT}
    width={width}
    height={height}
superset-frontend/packages/superset-ui-demo/storybook/stories/superset-ui-chart/SuperChart.stories.tsx on lines 56..70

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 97.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  {
    changed_on_delta_humanized: '1 days ago',
    clause: '1=1',
    description: 'some description',
    filter_type: 'Regular',
superset-frontend/src/pages/RowLevelSecurityList/RowLevelSecurityList.test.tsx on lines 66..94

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 97.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  test(`it will set state to payload from extra
  input change when schemas_allowed_for_file_upload`, () => {
    const action: DBReducerActionType = {
      type: ActionType.ExtraInputChange,
      payload: { name: 'schemas_allowed_for_file_upload', value: 'bar' },
superset-frontend/src/features/databases/DatabaseModal/index.test.tsx on lines 1824..1838

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 97.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

      is closed and action key is pressed`, () => {
    const event = {
      key: 'Enter',
      preventDefault: jest.fn(),
    } as unknown as KeyboardEvent<HTMLDivElement>;
superset-frontend/src/dashboard/components/SliceHeaderControls/SliceHeaderControls.test.tsx on lines 560..576

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 97.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            {isFieldATypeSpecificField('column_data_types', type) && (
              <Row>
                <Col span={24}>
                  <StyledFormItemWithTip
                    label={t('Column Data Types')}
superset-frontend/src/features/databases/UploadDataModel/index.tsx on lines 959..973

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 97.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

test('triggers onUndo', () => {
  const onUndo = jest.fn();
  render(<UndoRedoKeyListeners {...defaultProps} onUndo={onUndo} />);
  fireEvent.keyDown(document.body, { key: 'z', keyCode: 90, ctrlKey: true });
  expect(onUndo).toHaveBeenCalledTimes(1);
superset-frontend/src/dashboard/components/UndoRedoKeyListeners/UndoRedoKeyListeners.test.tsx on lines 39..44

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 97.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            {currentDataframeIndex && (
              <Row>
                <Col span={24}>
                  <StyledFormItemWithTip
                    label={t('Index Label')}
superset-frontend/src/features/databases/UploadDataModel/index.tsx on lines 909..923

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 97.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  test('should close dropdown menu if escape key is pressed', () => {
    const event = {
      key: 'Escape',
      preventDefault: jest.fn(),
    } as unknown as KeyboardEvent<HTMLDivElement>;
superset-frontend/src/dashboard/components/SliceHeaderControls/SliceHeaderControls.test.tsx on lines 486..502

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 97.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  {
    changed_on_delta_humanized: '2 days ago',
    clause: '2=2',
    description: 'some description 2',
    filter_type: 'Base',
superset-frontend/src/pages/RowLevelSecurityList/RowLevelSecurityList.test.tsx on lines 37..65

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 97.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

export const container50pct = ({
  width,
  height,
}: {
  width: string;
superset-frontend/packages/superset-ui-demo/storybook/stories/superset-ui-chart/SuperChart.stories.tsx on lines 38..46

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 97.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

test('triggers onRedo', () => {
  const onRedo = jest.fn();
  render(<UndoRedoKeyListeners {...defaultProps} onRedo={onRedo} />);
  fireEvent.keyDown(document.body, { key: 'y', keyCode: 89, ctrlKey: true });
  expect(onRedo).toHaveBeenCalledTimes(1);
superset-frontend/src/dashboard/components/UndoRedoKeyListeners/UndoRedoKeyListeners.test.tsx on lines 32..37

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 97.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

superset/migrations/versions/2015-10-05_22-11_1e2841a4128_.py on lines 0..38
superset/migrations/versions/2015-12-13_08-38_55179c7f25c7_sqla_descr.py on lines 0..38
superset/migrations/versions/2015-12-14_13-37_12d55656cbca_is_featured.py on lines 0..38
superset/migrations/versions/2016-01-17_22-00_7dbf98566af7_slice_description.py on lines 0..38
superset/migrations/versions/2016-01-18_23-43_43df8de3a5f4_dash_json.py on lines 0..38
superset/migrations/versions/2016-03-25_14-35_1d2ddd543133_log_dt.py on lines 0..38
superset/migrations/versions/2016-04-03_15-23_867bf4f117f9_adding_extra_field_to_database_model.py on lines 0..38
superset/migrations/versions/2016-08-18_14-06_3c3ffe173e4f_add_sql_string_to_table.py on lines 0..38
superset/migrations/versions/2016-09-30_18-01_ab3d66c4246e_add_cache_timeout_to_druid_cluster.py on lines 0..38
superset/migrations/versions/2016-11-02_17-36_c611f2b591b8_dim_spec.py on lines 0..38
superset/migrations/versions/2017-07-26_20-09_ca69c70ec99b_tracking_url.py on lines 0..38
superset/migrations/versions/2017-08-31_17-35_a9c47e2c1547_add_impersonate_user_to_dbs.py on lines 0..38
superset/migrations/versions/2018-08-29_14-35_55e910a74826_add_metadata_column_to_annotation_model_.py on lines 0..38
superset/migrations/versions/2020-08-08_18-10_f2672aa8350a_add_slack_to_alerts.py on lines 0..41
superset/migrations/versions/2023-06-29_18-38_240d23c7f86f_update_tag_model_w_description.py on lines 0..38

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 63.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

superset/migrations/versions/2015-10-05_22-11_1e2841a4128_.py on lines 0..38
superset/migrations/versions/2015-12-14_13-37_12d55656cbca_is_featured.py on lines 0..38
superset/migrations/versions/2016-01-17_22-00_7dbf98566af7_slice_description.py on lines 0..38
superset/migrations/versions/2016-01-18_23-43_43df8de3a5f4_dash_json.py on lines 0..38
superset/migrations/versions/2016-03-25_14-35_1d2ddd543133_log_dt.py on lines 0..38
superset/migrations/versions/2016-04-03_15-23_867bf4f117f9_adding_extra_field_to_database_model.py on lines 0..38
superset/migrations/versions/2016-08-18_14-06_3c3ffe173e4f_add_sql_string_to_table.py on lines 0..38
superset/migrations/versions/2016-09-30_18-01_ab3d66c4246e_add_cache_timeout_to_druid_cluster.py on lines 0..38
superset/migrations/versions/2016-11-02_17-36_c611f2b591b8_dim_spec.py on lines 0..38
superset/migrations/versions/2017-07-26_20-09_ca69c70ec99b_tracking_url.py on lines 0..38
superset/migrations/versions/2017-08-31_17-35_a9c47e2c1547_add_impersonate_user_to_dbs.py on lines 0..38
superset/migrations/versions/2018-08-29_14-35_55e910a74826_add_metadata_column_to_annotation_model_.py on lines 0..38
superset/migrations/versions/2019-10-09_15-05_cca2f5d568c8_add_encrypted_extra_to_dbs.py on lines 0..38
superset/migrations/versions/2020-08-08_18-10_f2672aa8350a_add_slack_to_alerts.py on lines 0..41
superset/migrations/versions/2023-06-29_18-38_240d23c7f86f_update_tag_model_w_description.py on lines 0..38

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 63.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

superset/migrations/versions/2015-10-05_22-11_1e2841a4128_.py on lines 0..38
superset/migrations/versions/2015-12-13_08-38_55179c7f25c7_sqla_descr.py on lines 0..38
superset/migrations/versions/2015-12-14_13-37_12d55656cbca_is_featured.py on lines 0..38
superset/migrations/versions/2016-01-17_22-00_7dbf98566af7_slice_description.py on lines 0..38
superset/migrations/versions/2016-01-18_23-43_43df8de3a5f4_dash_json.py on lines 0..38
superset/migrations/versions/2016-03-25_14-35_1d2ddd543133_log_dt.py on lines 0..38
superset/migrations/versions/2016-04-03_15-23_867bf4f117f9_adding_extra_field_to_database_model.py on lines 0..38
superset/migrations/versions/2016-08-18_14-06_3c3ffe173e4f_add_sql_string_to_table.py on lines 0..38
superset/migrations/versions/2016-11-02_17-36_c611f2b591b8_dim_spec.py on lines 0..38
superset/migrations/versions/2017-07-26_20-09_ca69c70ec99b_tracking_url.py on lines 0..38
superset/migrations/versions/2017-08-31_17-35_a9c47e2c1547_add_impersonate_user_to_dbs.py on lines 0..38
superset/migrations/versions/2018-08-29_14-35_55e910a74826_add_metadata_column_to_annotation_model_.py on lines 0..38
superset/migrations/versions/2019-10-09_15-05_cca2f5d568c8_add_encrypted_extra_to_dbs.py on lines 0..38
superset/migrations/versions/2020-08-08_18-10_f2672aa8350a_add_slack_to_alerts.py on lines 0..41
superset/migrations/versions/2023-06-29_18-38_240d23c7f86f_update_tag_model_w_description.py on lines 0..38

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 63.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

superset/migrations/versions/2015-10-05_22-11_1e2841a4128_.py on lines 0..38
superset/migrations/versions/2015-12-13_08-38_55179c7f25c7_sqla_descr.py on lines 0..38
superset/migrations/versions/2015-12-14_13-37_12d55656cbca_is_featured.py on lines 0..38
superset/migrations/versions/2016-01-17_22-00_7dbf98566af7_slice_description.py on lines 0..38
superset/migrations/versions/2016-01-18_23-43_43df8de3a5f4_dash_json.py on lines 0..38
superset/migrations/versions/2016-03-25_14-35_1d2ddd543133_log_dt.py on lines 0..38
superset/migrations/versions/2016-04-03_15-23_867bf4f117f9_adding_extra_field_to_database_model.py on lines 0..38
superset/migrations/versions/2016-09-30_18-01_ab3d66c4246e_add_cache_timeout_to_druid_cluster.py on lines 0..38
superset/migrations/versions/2016-11-02_17-36_c611f2b591b8_dim_spec.py on lines 0..38
superset/migrations/versions/2017-07-26_20-09_ca69c70ec99b_tracking_url.py on lines 0..38
superset/migrations/versions/2017-08-31_17-35_a9c47e2c1547_add_impersonate_user_to_dbs.py on lines 0..38
superset/migrations/versions/2018-08-29_14-35_55e910a74826_add_metadata_column_to_annotation_model_.py on lines 0..38
superset/migrations/versions/2019-10-09_15-05_cca2f5d568c8_add_encrypted_extra_to_dbs.py on lines 0..38
superset/migrations/versions/2020-08-08_18-10_f2672aa8350a_add_slack_to_alerts.py on lines 0..41
superset/migrations/versions/2023-06-29_18-38_240d23c7f86f_update_tag_model_w_description.py on lines 0..38

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 63.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

superset/migrations/versions/2015-10-05_22-11_1e2841a4128_.py on lines 0..38
superset/migrations/versions/2015-12-13_08-38_55179c7f25c7_sqla_descr.py on lines 0..38
superset/migrations/versions/2015-12-14_13-37_12d55656cbca_is_featured.py on lines 0..38
superset/migrations/versions/2016-01-17_22-00_7dbf98566af7_slice_description.py on lines 0..38
superset/migrations/versions/2016-01-18_23-43_43df8de3a5f4_dash_json.py on lines 0..38
superset/migrations/versions/2016-03-25_14-35_1d2ddd543133_log_dt.py on lines 0..38
superset/migrations/versions/2016-04-03_15-23_867bf4f117f9_adding_extra_field_to_database_model.py on lines 0..38
superset/migrations/versions/2016-08-18_14-06_3c3ffe173e4f_add_sql_string_to_table.py on lines 0..38
superset/migrations/versions/2016-09-30_18-01_ab3d66c4246e_add_cache_timeout_to_druid_cluster.py on lines 0..38
superset/migrations/versions/2016-11-02_17-36_c611f2b591b8_dim_spec.py on lines 0..38
superset/migrations/versions/2017-08-31_17-35_a9c47e2c1547_add_impersonate_user_to_dbs.py on lines 0..38
superset/migrations/versions/2018-08-29_14-35_55e910a74826_add_metadata_column_to_annotation_model_.py on lines 0..38
superset/migrations/versions/2019-10-09_15-05_cca2f5d568c8_add_encrypted_extra_to_dbs.py on lines 0..38
superset/migrations/versions/2020-08-08_18-10_f2672aa8350a_add_slack_to_alerts.py on lines 0..41
superset/migrations/versions/2023-06-29_18-38_240d23c7f86f_update_tag_model_w_description.py on lines 0..38

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 63.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

superset/migrations/versions/2015-10-05_22-11_1e2841a4128_.py on lines 0..38
superset/migrations/versions/2015-12-13_08-38_55179c7f25c7_sqla_descr.py on lines 0..38
superset/migrations/versions/2015-12-14_13-37_12d55656cbca_is_featured.py on lines 0..38
superset/migrations/versions/2016-01-17_22-00_7dbf98566af7_slice_description.py on lines 0..38
superset/migrations/versions/2016-01-18_23-43_43df8de3a5f4_dash_json.py on lines 0..38
superset/migrations/versions/2016-04-03_15-23_867bf4f117f9_adding_extra_field_to_database_model.py on lines 0..38
superset/migrations/versions/2016-08-18_14-06_3c3ffe173e4f_add_sql_string_to_table.py on lines 0..38
superset/migrations/versions/2016-09-30_18-01_ab3d66c4246e_add_cache_timeout_to_druid_cluster.py on lines 0..38
superset/migrations/versions/2016-11-02_17-36_c611f2b591b8_dim_spec.py on lines 0..38
superset/migrations/versions/2017-07-26_20-09_ca69c70ec99b_tracking_url.py on lines 0..38
superset/migrations/versions/2017-08-31_17-35_a9c47e2c1547_add_impersonate_user_to_dbs.py on lines 0..38
superset/migrations/versions/2018-08-29_14-35_55e910a74826_add_metadata_column_to_annotation_model_.py on lines 0..38
superset/migrations/versions/2019-10-09_15-05_cca2f5d568c8_add_encrypted_extra_to_dbs.py on lines 0..38
superset/migrations/versions/2020-08-08_18-10_f2672aa8350a_add_slack_to_alerts.py on lines 0..41
superset/migrations/versions/2023-06-29_18-38_240d23c7f86f_update_tag_model_w_description.py on lines 0..38

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 63.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

superset/migrations/versions/2015-10-05_22-11_1e2841a4128_.py on lines 0..38
superset/migrations/versions/2015-12-13_08-38_55179c7f25c7_sqla_descr.py on lines 0..38
superset/migrations/versions/2016-01-17_22-00_7dbf98566af7_slice_description.py on lines 0..38
superset/migrations/versions/2016-01-18_23-43_43df8de3a5f4_dash_json.py on lines 0..38
superset/migrations/versions/2016-03-25_14-35_1d2ddd543133_log_dt.py on lines 0..38
superset/migrations/versions/2016-04-03_15-23_867bf4f117f9_adding_extra_field_to_database_model.py on lines 0..38
superset/migrations/versions/2016-08-18_14-06_3c3ffe173e4f_add_sql_string_to_table.py on lines 0..38
superset/migrations/versions/2016-09-30_18-01_ab3d66c4246e_add_cache_timeout_to_druid_cluster.py on lines 0..38
superset/migrations/versions/2016-11-02_17-36_c611f2b591b8_dim_spec.py on lines 0..38
superset/migrations/versions/2017-07-26_20-09_ca69c70ec99b_tracking_url.py on lines 0..38
superset/migrations/versions/2017-08-31_17-35_a9c47e2c1547_add_impersonate_user_to_dbs.py on lines 0..38
superset/migrations/versions/2018-08-29_14-35_55e910a74826_add_metadata_column_to_annotation_model_.py on lines 0..38
superset/migrations/versions/2019-10-09_15-05_cca2f5d568c8_add_encrypted_extra_to_dbs.py on lines 0..38
superset/migrations/versions/2020-08-08_18-10_f2672aa8350a_add_slack_to_alerts.py on lines 0..41
superset/migrations/versions/2023-06-29_18-38_240d23c7f86f_update_tag_model_w_description.py on lines 0..38

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 63.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language