fossasia/open-event-orga-server

View on GitHub

Showing 1,194 of 1,194 total issues

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

Severity: Major
Found in migrations/versions/41818fe31207_.py and 5 other locations - About 6 hrs to fix
migrations/versions/49f3a33f5437_.py on lines 0..29
migrations/versions/6f7b6fad3f53_add_can_pay_by_omise_in_event_model.py on lines 0..29
migrations/versions/rev-2021-01-16-00:39:16-090edbf94df2_.py on lines 0..29
migrations/versions/rev-2021-03-26-02:13:43-49994f8ad895_.py on lines 0..29
migrations/versions/rev-2022-03-31-22:29:53-0dba0c2e0ba0_.py on lines 0..29

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 104.

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

Severity: Major
Found in migrations/versions/rev-2021-12-09-16:49:44-b0985248e3d9_.py and 1 other location - About 6 hrs to fix
migrations/versions/bc1c553a72c5_.py on lines 0..29

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 104.

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

Severity: Major
Found in migrations/versions/bc1c553a72c5_.py and 1 other location - About 6 hrs to fix
migrations/versions/rev-2021-12-09-16:49:44-b0985248e3d9_.py on lines 0..29

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 104.

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 6 locations. Consider refactoring.
Open

migrations/versions/41818fe31207_.py on lines 0..30
migrations/versions/49f3a33f5437_.py on lines 0..29
migrations/versions/6f7b6fad3f53_add_can_pay_by_omise_in_event_model.py on lines 0..29
migrations/versions/rev-2021-01-16-00:39:16-090edbf94df2_.py on lines 0..29
migrations/versions/rev-2022-03-31-22:29:53-0dba0c2e0ba0_.py on lines 0..29

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 104.

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 6 locations. Consider refactoring.
Open

migrations/versions/41818fe31207_.py on lines 0..30
migrations/versions/49f3a33f5437_.py on lines 0..29
migrations/versions/6f7b6fad3f53_add_can_pay_by_omise_in_event_model.py on lines 0..29
migrations/versions/rev-2021-03-26-02:13:43-49994f8ad895_.py on lines 0..29
migrations/versions/rev-2022-03-31-22:29:53-0dba0c2e0ba0_.py on lines 0..29

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 104.

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

def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('settings', 'admin_company')
    op.drop_column('settings', 'admin_billing_zip')
    op.drop_column('settings', 'admin_billing_tax_info')
Severity: Major
Found in migrations/versions/b08a4ffff5dd_.py and 1 other location - About 6 hrs to fix
migrations/versions/703eda37e75c_.py on lines 33..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 104.

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

File permission_manager.py has 432 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import logging
from typing import Union

from flask import request
from flask_jwt_extended import current_user, verify_jwt_in_request
Severity: Minor
Found in app/api/helpers/permission_manager.py - About 6 hrs to fix

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

def export_speakers_csv(speakers):
    headers = [
        'Speaker Name',
        'Speaker Email',
        'Speaker Session(s)',
Severity: Minor
Found in app/api/helpers/csv_jobs_util.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

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

Severity: Major
Found in migrations/versions/80a704b880db_.py and 11 other locations - About 6 hrs to fix
migrations/versions/0ac3fd02c230_.py on lines 0..28
migrations/versions/193fadf22de7_.py on lines 0..28
migrations/versions/3a1e54b1be78_.py on lines 0..28
migrations/versions/40709a13f64d_.py on lines 0..28
migrations/versions/475688ee0c8a_.py on lines 0..28
migrations/versions/60548d0505ea_.py on lines 0..28
migrations/versions/ab545d15d160_.py on lines 0..28
migrations/versions/afa76758760e_.py on lines 0..28
migrations/versions/cc6c2a3152bd_.py on lines 0..28
migrations/versions/f55fde3d62b1_.py on lines 0..28
migrations/versions/f6205b904315_.py on lines 0..28

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 101.

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 12 locations. Consider refactoring.
Open

Severity: Major
Found in migrations/versions/afa76758760e_.py and 11 other locations - About 6 hrs to fix
migrations/versions/0ac3fd02c230_.py on lines 0..28
migrations/versions/193fadf22de7_.py on lines 0..28
migrations/versions/3a1e54b1be78_.py on lines 0..28
migrations/versions/40709a13f64d_.py on lines 0..28
migrations/versions/475688ee0c8a_.py on lines 0..28
migrations/versions/60548d0505ea_.py on lines 0..28
migrations/versions/80a704b880db_.py on lines 0..28
migrations/versions/ab545d15d160_.py on lines 0..28
migrations/versions/cc6c2a3152bd_.py on lines 0..28
migrations/versions/f55fde3d62b1_.py on lines 0..28
migrations/versions/f6205b904315_.py on lines 0..28

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 101.

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 12 locations. Consider refactoring.
Open

Severity: Major
Found in migrations/versions/60548d0505ea_.py and 11 other locations - About 6 hrs to fix
migrations/versions/0ac3fd02c230_.py on lines 0..28
migrations/versions/193fadf22de7_.py on lines 0..28
migrations/versions/3a1e54b1be78_.py on lines 0..28
migrations/versions/40709a13f64d_.py on lines 0..28
migrations/versions/475688ee0c8a_.py on lines 0..28
migrations/versions/80a704b880db_.py on lines 0..28
migrations/versions/ab545d15d160_.py on lines 0..28
migrations/versions/afa76758760e_.py on lines 0..28
migrations/versions/cc6c2a3152bd_.py on lines 0..28
migrations/versions/f55fde3d62b1_.py on lines 0..28
migrations/versions/f6205b904315_.py on lines 0..28

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 101.

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 12 locations. Consider refactoring.
Open

Severity: Major
Found in migrations/versions/cc6c2a3152bd_.py and 11 other locations - About 6 hrs to fix
migrations/versions/0ac3fd02c230_.py on lines 0..28
migrations/versions/193fadf22de7_.py on lines 0..28
migrations/versions/3a1e54b1be78_.py on lines 0..28
migrations/versions/40709a13f64d_.py on lines 0..28
migrations/versions/475688ee0c8a_.py on lines 0..28
migrations/versions/60548d0505ea_.py on lines 0..28
migrations/versions/80a704b880db_.py on lines 0..28
migrations/versions/ab545d15d160_.py on lines 0..28
migrations/versions/afa76758760e_.py on lines 0..28
migrations/versions/f55fde3d62b1_.py on lines 0..28
migrations/versions/f6205b904315_.py on lines 0..28

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 101.

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 12 locations. Consider refactoring.
Open

Severity: Major
Found in migrations/versions/40709a13f64d_.py and 11 other locations - About 6 hrs to fix
migrations/versions/0ac3fd02c230_.py on lines 0..28
migrations/versions/193fadf22de7_.py on lines 0..28
migrations/versions/3a1e54b1be78_.py on lines 0..28
migrations/versions/475688ee0c8a_.py on lines 0..28
migrations/versions/60548d0505ea_.py on lines 0..28
migrations/versions/80a704b880db_.py on lines 0..28
migrations/versions/ab545d15d160_.py on lines 0..28
migrations/versions/afa76758760e_.py on lines 0..28
migrations/versions/cc6c2a3152bd_.py on lines 0..28
migrations/versions/f55fde3d62b1_.py on lines 0..28
migrations/versions/f6205b904315_.py on lines 0..28

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 101.

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 10 locations. Consider refactoring.
Open

migrations/versions/4fe385f78f53_.py on lines 0..29
migrations/versions/df468100bb57_.py on lines 0..28
migrations/versions/rev-2019-08-07-01:11:29-f5c3a4fd23fb_.py on lines 0..29
migrations/versions/rev-2020-09-16-01:15:24-f736b1d888a7_.py on lines 0..29
migrations/versions/rev-2020-12-11-08:51:44-73dad592fcd6_.py on lines 0..29
migrations/versions/rev-2021-01-16-01:44:05-eb4a6c91874d_.py on lines 0..29
migrations/versions/rev-2021-01-18-00:12:27-9afc35c9f00f_.py on lines 0..29
migrations/versions/rev-2021-03-09-10:07:46-5900f4433257_add_rocket_chat.py on lines 0..29
migrations/versions/rev-2021-03-10-19:23:44-6c79ac9607e7_.py on lines 0..29

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 101.

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 12 locations. Consider refactoring.
Open

Severity: Major
Found in migrations/versions/0ac3fd02c230_.py and 11 other locations - About 6 hrs to fix
migrations/versions/193fadf22de7_.py on lines 0..28
migrations/versions/3a1e54b1be78_.py on lines 0..28
migrations/versions/40709a13f64d_.py on lines 0..28
migrations/versions/475688ee0c8a_.py on lines 0..28
migrations/versions/60548d0505ea_.py on lines 0..28
migrations/versions/80a704b880db_.py on lines 0..28
migrations/versions/ab545d15d160_.py on lines 0..28
migrations/versions/afa76758760e_.py on lines 0..28
migrations/versions/cc6c2a3152bd_.py on lines 0..28
migrations/versions/f55fde3d62b1_.py on lines 0..28
migrations/versions/f6205b904315_.py on lines 0..28

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 101.

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 10 locations. Consider refactoring.
Open

migrations/versions/4fe385f78f53_.py on lines 0..29
migrations/versions/df468100bb57_.py on lines 0..28
migrations/versions/rev-2019-08-07-01:11:29-f5c3a4fd23fb_.py on lines 0..29
migrations/versions/rev-2020-09-16-01:15:24-f736b1d888a7_.py on lines 0..29
migrations/versions/rev-2020-12-11-08:51:44-73dad592fcd6_.py on lines 0..29
migrations/versions/rev-2021-01-18-00:12:27-9afc35c9f00f_.py on lines 0..29
migrations/versions/rev-2021-03-09-10:07:46-5900f4433257_add_rocket_chat.py on lines 0..29
migrations/versions/rev-2021-03-10-19:23:44-6c79ac9607e7_.py on lines 0..29
migrations/versions/rev-2021-07-19-20:40:32-304e8820c95a_.py on lines 0..29

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 101.

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 10 locations. Consider refactoring.
Open

migrations/versions/4fe385f78f53_.py on lines 0..29
migrations/versions/df468100bb57_.py on lines 0..28
migrations/versions/rev-2019-08-07-01:11:29-f5c3a4fd23fb_.py on lines 0..29
migrations/versions/rev-2020-12-11-08:51:44-73dad592fcd6_.py on lines 0..29
migrations/versions/rev-2021-01-16-01:44:05-eb4a6c91874d_.py on lines 0..29
migrations/versions/rev-2021-01-18-00:12:27-9afc35c9f00f_.py on lines 0..29
migrations/versions/rev-2021-03-09-10:07:46-5900f4433257_add_rocket_chat.py on lines 0..29
migrations/versions/rev-2021-03-10-19:23:44-6c79ac9607e7_.py on lines 0..29
migrations/versions/rev-2021-07-19-20:40:32-304e8820c95a_.py on lines 0..29

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 101.

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 10 locations. Consider refactoring.
Open

migrations/versions/4fe385f78f53_.py on lines 0..29
migrations/versions/df468100bb57_.py on lines 0..28
migrations/versions/rev-2019-08-07-01:11:29-f5c3a4fd23fb_.py on lines 0..29
migrations/versions/rev-2020-09-16-01:15:24-f736b1d888a7_.py on lines 0..29
migrations/versions/rev-2021-01-16-01:44:05-eb4a6c91874d_.py on lines 0..29
migrations/versions/rev-2021-01-18-00:12:27-9afc35c9f00f_.py on lines 0..29
migrations/versions/rev-2021-03-09-10:07:46-5900f4433257_add_rocket_chat.py on lines 0..29
migrations/versions/rev-2021-03-10-19:23:44-6c79ac9607e7_.py on lines 0..29
migrations/versions/rev-2021-07-19-20:40:32-304e8820c95a_.py on lines 0..29

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 101.

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 12 locations. Consider refactoring.
Open

Severity: Major
Found in migrations/versions/193fadf22de7_.py and 11 other locations - About 6 hrs to fix
migrations/versions/0ac3fd02c230_.py on lines 0..28
migrations/versions/3a1e54b1be78_.py on lines 0..28
migrations/versions/40709a13f64d_.py on lines 0..28
migrations/versions/475688ee0c8a_.py on lines 0..28
migrations/versions/60548d0505ea_.py on lines 0..28
migrations/versions/80a704b880db_.py on lines 0..28
migrations/versions/ab545d15d160_.py on lines 0..28
migrations/versions/afa76758760e_.py on lines 0..28
migrations/versions/cc6c2a3152bd_.py on lines 0..28
migrations/versions/f55fde3d62b1_.py on lines 0..28
migrations/versions/f6205b904315_.py on lines 0..28

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 101.

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 12 locations. Consider refactoring.
Open

Severity: Major
Found in migrations/versions/ab545d15d160_.py and 11 other locations - About 6 hrs to fix
migrations/versions/0ac3fd02c230_.py on lines 0..28
migrations/versions/193fadf22de7_.py on lines 0..28
migrations/versions/3a1e54b1be78_.py on lines 0..28
migrations/versions/40709a13f64d_.py on lines 0..28
migrations/versions/475688ee0c8a_.py on lines 0..28
migrations/versions/60548d0505ea_.py on lines 0..28
migrations/versions/80a704b880db_.py on lines 0..28
migrations/versions/afa76758760e_.py on lines 0..28
migrations/versions/cc6c2a3152bd_.py on lines 0..28
migrations/versions/f55fde3d62b1_.py on lines 0..28
migrations/versions/f6205b904315_.py on lines 0..28

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 101.

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