jacquev6/LowVoltage

View on GitHub

Showing 276 of 329 total issues

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

    def test_return_values_updated_old(self):
        self.assertEqual(
            UpdateItem("Table", {"hash": u"h"}).return_values_updated_old().payload,
            {
                "TableName": "Table",
Severity: Major
Found in LowVoltage/actions/update_item.py and 25 other locations - About 1 hr to fix
LowVoltage/actions/delete_item.py on lines 282..288
LowVoltage/actions/delete_item.py on lines 292..298
LowVoltage/actions/delete_item.py on lines 302..308
LowVoltage/actions/delete_item.py on lines 312..318
LowVoltage/actions/delete_item.py on lines 322..328
LowVoltage/actions/delete_item.py on lines 332..338
LowVoltage/actions/delete_item.py on lines 342..348
LowVoltage/actions/get_item.py on lines 234..240
LowVoltage/actions/get_item.py on lines 244..250
LowVoltage/actions/put_item.py on lines 268..274
LowVoltage/actions/put_item.py on lines 278..284
LowVoltage/actions/put_item.py on lines 288..294
LowVoltage/actions/put_item.py on lines 298..304
LowVoltage/actions/put_item.py on lines 308..314
LowVoltage/actions/put_item.py on lines 318..324
LowVoltage/actions/put_item.py on lines 328..334
LowVoltage/actions/update_item.py on lines 542..548
LowVoltage/actions/update_item.py on lines 552..558
LowVoltage/actions/update_item.py on lines 562..568
LowVoltage/actions/update_item.py on lines 582..588
LowVoltage/actions/update_item.py on lines 592..598
LowVoltage/actions/update_item.py on lines 602..608
LowVoltage/actions/update_item.py on lines 612..618
LowVoltage/actions/update_item.py on lines 622..628
LowVoltage/actions/update_item.py on lines 632..638

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

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

    def test_return_consumed_capacity_total(self):
        self.assertEqual(
            PutItem("Table", {"hash": u"h"}).return_consumed_capacity_total().payload,
            {
                "TableName": "Table",
Severity: Major
Found in LowVoltage/actions/put_item.py and 25 other locations - About 1 hr to fix
LowVoltage/actions/delete_item.py on lines 282..288
LowVoltage/actions/delete_item.py on lines 292..298
LowVoltage/actions/delete_item.py on lines 302..308
LowVoltage/actions/delete_item.py on lines 312..318
LowVoltage/actions/delete_item.py on lines 322..328
LowVoltage/actions/delete_item.py on lines 332..338
LowVoltage/actions/delete_item.py on lines 342..348
LowVoltage/actions/get_item.py on lines 234..240
LowVoltage/actions/get_item.py on lines 244..250
LowVoltage/actions/put_item.py on lines 268..274
LowVoltage/actions/put_item.py on lines 278..284
LowVoltage/actions/put_item.py on lines 298..304
LowVoltage/actions/put_item.py on lines 308..314
LowVoltage/actions/put_item.py on lines 318..324
LowVoltage/actions/put_item.py on lines 328..334
LowVoltage/actions/update_item.py on lines 542..548
LowVoltage/actions/update_item.py on lines 552..558
LowVoltage/actions/update_item.py on lines 562..568
LowVoltage/actions/update_item.py on lines 572..578
LowVoltage/actions/update_item.py on lines 582..588
LowVoltage/actions/update_item.py on lines 592..598
LowVoltage/actions/update_item.py on lines 602..608
LowVoltage/actions/update_item.py on lines 612..618
LowVoltage/actions/update_item.py on lines 622..628
LowVoltage/actions/update_item.py on lines 632..638

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

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

    def test_return_item_collection_metrics_size(self):
        self.assertEqual(
            PutItem("Table", {"hash": u"h"}).return_item_collection_metrics_size().payload,
            {
                "TableName": "Table",
Severity: Major
Found in LowVoltage/actions/put_item.py and 25 other locations - About 1 hr to fix
LowVoltage/actions/delete_item.py on lines 282..288
LowVoltage/actions/delete_item.py on lines 292..298
LowVoltage/actions/delete_item.py on lines 302..308
LowVoltage/actions/delete_item.py on lines 312..318
LowVoltage/actions/delete_item.py on lines 322..328
LowVoltage/actions/delete_item.py on lines 332..338
LowVoltage/actions/delete_item.py on lines 342..348
LowVoltage/actions/get_item.py on lines 234..240
LowVoltage/actions/get_item.py on lines 244..250
LowVoltage/actions/put_item.py on lines 268..274
LowVoltage/actions/put_item.py on lines 278..284
LowVoltage/actions/put_item.py on lines 288..294
LowVoltage/actions/put_item.py on lines 298..304
LowVoltage/actions/put_item.py on lines 308..314
LowVoltage/actions/put_item.py on lines 328..334
LowVoltage/actions/update_item.py on lines 542..548
LowVoltage/actions/update_item.py on lines 552..558
LowVoltage/actions/update_item.py on lines 562..568
LowVoltage/actions/update_item.py on lines 572..578
LowVoltage/actions/update_item.py on lines 582..588
LowVoltage/actions/update_item.py on lines 592..598
LowVoltage/actions/update_item.py on lines 602..608
LowVoltage/actions/update_item.py on lines 612..618
LowVoltage/actions/update_item.py on lines 622..628
LowVoltage/actions/update_item.py on lines 632..638

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

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

    def test_return_consumed_capacity_none(self):
        self.assertEqual(
            GetItem("Table", {"hash": u"h"}).return_consumed_capacity_none().payload,
            {
                "TableName": "Table",
Severity: Major
Found in LowVoltage/actions/get_item.py and 25 other locations - About 1 hr to fix
LowVoltage/actions/delete_item.py on lines 282..288
LowVoltage/actions/delete_item.py on lines 292..298
LowVoltage/actions/delete_item.py on lines 302..308
LowVoltage/actions/delete_item.py on lines 312..318
LowVoltage/actions/delete_item.py on lines 322..328
LowVoltage/actions/delete_item.py on lines 332..338
LowVoltage/actions/delete_item.py on lines 342..348
LowVoltage/actions/get_item.py on lines 244..250
LowVoltage/actions/put_item.py on lines 268..274
LowVoltage/actions/put_item.py on lines 278..284
LowVoltage/actions/put_item.py on lines 288..294
LowVoltage/actions/put_item.py on lines 298..304
LowVoltage/actions/put_item.py on lines 308..314
LowVoltage/actions/put_item.py on lines 318..324
LowVoltage/actions/put_item.py on lines 328..334
LowVoltage/actions/update_item.py on lines 542..548
LowVoltage/actions/update_item.py on lines 552..558
LowVoltage/actions/update_item.py on lines 562..568
LowVoltage/actions/update_item.py on lines 572..578
LowVoltage/actions/update_item.py on lines 582..588
LowVoltage/actions/update_item.py on lines 592..598
LowVoltage/actions/update_item.py on lines 602..608
LowVoltage/actions/update_item.py on lines 612..618
LowVoltage/actions/update_item.py on lines 622..628
LowVoltage/actions/update_item.py on lines 632..638

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

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

    def test_return_values_updated_new(self):
        self.assertEqual(
            UpdateItem("Table", {"hash": u"h"}).return_values_updated_new().payload,
            {
                "TableName": "Table",
Severity: Major
Found in LowVoltage/actions/update_item.py and 25 other locations - About 1 hr to fix
LowVoltage/actions/delete_item.py on lines 282..288
LowVoltage/actions/delete_item.py on lines 292..298
LowVoltage/actions/delete_item.py on lines 302..308
LowVoltage/actions/delete_item.py on lines 312..318
LowVoltage/actions/delete_item.py on lines 322..328
LowVoltage/actions/delete_item.py on lines 332..338
LowVoltage/actions/delete_item.py on lines 342..348
LowVoltage/actions/get_item.py on lines 234..240
LowVoltage/actions/get_item.py on lines 244..250
LowVoltage/actions/put_item.py on lines 268..274
LowVoltage/actions/put_item.py on lines 278..284
LowVoltage/actions/put_item.py on lines 288..294
LowVoltage/actions/put_item.py on lines 298..304
LowVoltage/actions/put_item.py on lines 308..314
LowVoltage/actions/put_item.py on lines 318..324
LowVoltage/actions/put_item.py on lines 328..334
LowVoltage/actions/update_item.py on lines 542..548
LowVoltage/actions/update_item.py on lines 552..558
LowVoltage/actions/update_item.py on lines 572..578
LowVoltage/actions/update_item.py on lines 582..588
LowVoltage/actions/update_item.py on lines 592..598
LowVoltage/actions/update_item.py on lines 602..608
LowVoltage/actions/update_item.py on lines 612..618
LowVoltage/actions/update_item.py on lines 622..628
LowVoltage/actions/update_item.py on lines 632..638

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

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

    def test_return_item_collection_metrics_none(self):
        self.assertEqual(
            PutItem("Table", {"hash": u"h"}).return_item_collection_metrics_none().payload,
            {
                "TableName": "Table",
Severity: Major
Found in LowVoltage/actions/put_item.py and 25 other locations - About 1 hr to fix
LowVoltage/actions/delete_item.py on lines 282..288
LowVoltage/actions/delete_item.py on lines 292..298
LowVoltage/actions/delete_item.py on lines 302..308
LowVoltage/actions/delete_item.py on lines 312..318
LowVoltage/actions/delete_item.py on lines 322..328
LowVoltage/actions/delete_item.py on lines 332..338
LowVoltage/actions/delete_item.py on lines 342..348
LowVoltage/actions/get_item.py on lines 234..240
LowVoltage/actions/get_item.py on lines 244..250
LowVoltage/actions/put_item.py on lines 268..274
LowVoltage/actions/put_item.py on lines 278..284
LowVoltage/actions/put_item.py on lines 288..294
LowVoltage/actions/put_item.py on lines 298..304
LowVoltage/actions/put_item.py on lines 308..314
LowVoltage/actions/put_item.py on lines 318..324
LowVoltage/actions/update_item.py on lines 542..548
LowVoltage/actions/update_item.py on lines 552..558
LowVoltage/actions/update_item.py on lines 562..568
LowVoltage/actions/update_item.py on lines 572..578
LowVoltage/actions/update_item.py on lines 582..588
LowVoltage/actions/update_item.py on lines 592..598
LowVoltage/actions/update_item.py on lines 602..608
LowVoltage/actions/update_item.py on lines 612..618
LowVoltage/actions/update_item.py on lines 622..628
LowVoltage/actions/update_item.py on lines 632..638

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

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

    def test_return_values_none(self):
        self.assertEqual(
            UpdateItem("Table", {"hash": u"h"}).return_values_none().payload,
            {
                "TableName": "Table",
Severity: Major
Found in LowVoltage/actions/update_item.py and 25 other locations - About 1 hr to fix
LowVoltage/actions/delete_item.py on lines 282..288
LowVoltage/actions/delete_item.py on lines 292..298
LowVoltage/actions/delete_item.py on lines 302..308
LowVoltage/actions/delete_item.py on lines 312..318
LowVoltage/actions/delete_item.py on lines 322..328
LowVoltage/actions/delete_item.py on lines 332..338
LowVoltage/actions/delete_item.py on lines 342..348
LowVoltage/actions/get_item.py on lines 234..240
LowVoltage/actions/get_item.py on lines 244..250
LowVoltage/actions/put_item.py on lines 268..274
LowVoltage/actions/put_item.py on lines 278..284
LowVoltage/actions/put_item.py on lines 288..294
LowVoltage/actions/put_item.py on lines 298..304
LowVoltage/actions/put_item.py on lines 308..314
LowVoltage/actions/put_item.py on lines 318..324
LowVoltage/actions/put_item.py on lines 328..334
LowVoltage/actions/update_item.py on lines 542..548
LowVoltage/actions/update_item.py on lines 552..558
LowVoltage/actions/update_item.py on lines 562..568
LowVoltage/actions/update_item.py on lines 572..578
LowVoltage/actions/update_item.py on lines 592..598
LowVoltage/actions/update_item.py on lines 602..608
LowVoltage/actions/update_item.py on lines 612..618
LowVoltage/actions/update_item.py on lines 622..628
LowVoltage/actions/update_item.py on lines 632..638

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

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

    def test_project_all_without_active_index(self):
        with self.assertRaises(_lv.BuilderError) as catcher:
            CreateTable("Foo").project_all()
        self.assertEqual(catcher.exception.args, ("No active index.",))
Severity: Major
Found in LowVoltage/actions/create_table.py and 3 other locations - About 1 hr to fix
LowVoltage/actions/create_table.py on lines 558..561
LowVoltage/actions/update_table.py on lines 530..533
LowVoltage/actions/update_table.py on lines 540..543

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

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

    def test_project_keys_only_without_active_index(self):
        with self.assertRaises(_lv.BuilderError) as catcher:
            CreateTable("Foo").project_keys_only()
        self.assertEqual(catcher.exception.args, ("No active index.",))
Severity: Major
Found in LowVoltage/actions/create_table.py and 3 other locations - About 1 hr to fix
LowVoltage/actions/create_table.py on lines 553..556
LowVoltage/actions/update_table.py on lines 530..533
LowVoltage/actions/update_table.py on lines 540..543

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

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 test_consistent_read_false(self):
        self.assertEqual(
            GetItem("Table", {"hash": u"h"}).consistent_read_false().payload,
            {
                "TableName": "Table",
Severity: Major
Found in LowVoltage/actions/get_item.py and 1 other location - About 1 hr to fix
LowVoltage/actions/get_item.py on lines 254..260

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

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

    @property
    def global_secondary_indexes(self):
        """
        The capacity consumed on GSIs.

Severity: Major
Found in LowVoltage/actions/return_types.py and 1 other location - About 1 hr to fix
LowVoltage/actions/return_types.py on lines 639..647

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

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

    def test_return_consumed_capacity_indexes(self):
        self.assertEqual(
            DeleteItem("Table", {"hash": u"h"}).return_consumed_capacity_indexes().payload,
            {
                "TableName": "Table",
Severity: Major
Found in LowVoltage/actions/delete_item.py and 25 other locations - About 1 hr to fix
LowVoltage/actions/delete_item.py on lines 282..288
LowVoltage/actions/delete_item.py on lines 292..298
LowVoltage/actions/delete_item.py on lines 302..308
LowVoltage/actions/delete_item.py on lines 322..328
LowVoltage/actions/delete_item.py on lines 332..338
LowVoltage/actions/delete_item.py on lines 342..348
LowVoltage/actions/get_item.py on lines 234..240
LowVoltage/actions/get_item.py on lines 244..250
LowVoltage/actions/put_item.py on lines 268..274
LowVoltage/actions/put_item.py on lines 278..284
LowVoltage/actions/put_item.py on lines 288..294
LowVoltage/actions/put_item.py on lines 298..304
LowVoltage/actions/put_item.py on lines 308..314
LowVoltage/actions/put_item.py on lines 318..324
LowVoltage/actions/put_item.py on lines 328..334
LowVoltage/actions/update_item.py on lines 542..548
LowVoltage/actions/update_item.py on lines 552..558
LowVoltage/actions/update_item.py on lines 562..568
LowVoltage/actions/update_item.py on lines 572..578
LowVoltage/actions/update_item.py on lines 582..588
LowVoltage/actions/update_item.py on lines 592..598
LowVoltage/actions/update_item.py on lines 602..608
LowVoltage/actions/update_item.py on lines 612..618
LowVoltage/actions/update_item.py on lines 622..628
LowVoltage/actions/update_item.py on lines 632..638

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

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

    def test_return_item_collection_metrics_none(self):
        self.assertEqual(
            DeleteItem("Table", {"hash": u"h"}).return_item_collection_metrics_none().payload,
            {
                "TableName": "Table",
Severity: Major
Found in LowVoltage/actions/delete_item.py and 25 other locations - About 1 hr to fix
LowVoltage/actions/delete_item.py on lines 282..288
LowVoltage/actions/delete_item.py on lines 292..298
LowVoltage/actions/delete_item.py on lines 302..308
LowVoltage/actions/delete_item.py on lines 312..318
LowVoltage/actions/delete_item.py on lines 322..328
LowVoltage/actions/delete_item.py on lines 332..338
LowVoltage/actions/get_item.py on lines 234..240
LowVoltage/actions/get_item.py on lines 244..250
LowVoltage/actions/put_item.py on lines 268..274
LowVoltage/actions/put_item.py on lines 278..284
LowVoltage/actions/put_item.py on lines 288..294
LowVoltage/actions/put_item.py on lines 298..304
LowVoltage/actions/put_item.py on lines 308..314
LowVoltage/actions/put_item.py on lines 318..324
LowVoltage/actions/put_item.py on lines 328..334
LowVoltage/actions/update_item.py on lines 542..548
LowVoltage/actions/update_item.py on lines 552..558
LowVoltage/actions/update_item.py on lines 562..568
LowVoltage/actions/update_item.py on lines 572..578
LowVoltage/actions/update_item.py on lines 582..588
LowVoltage/actions/update_item.py on lines 592..598
LowVoltage/actions/update_item.py on lines 602..608
LowVoltage/actions/update_item.py on lines 612..618
LowVoltage/actions/update_item.py on lines 622..628
LowVoltage/actions/update_item.py on lines 632..638

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

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

    def test_return_values_all_old(self):
        self.assertEqual(
            PutItem("Table", {"hash": u"h"}).return_values_all_old().payload,
            {
                "TableName": "Table",
Severity: Major
Found in LowVoltage/actions/put_item.py and 25 other locations - About 1 hr to fix
LowVoltage/actions/delete_item.py on lines 282..288
LowVoltage/actions/delete_item.py on lines 292..298
LowVoltage/actions/delete_item.py on lines 302..308
LowVoltage/actions/delete_item.py on lines 312..318
LowVoltage/actions/delete_item.py on lines 322..328
LowVoltage/actions/delete_item.py on lines 332..338
LowVoltage/actions/delete_item.py on lines 342..348
LowVoltage/actions/get_item.py on lines 234..240
LowVoltage/actions/get_item.py on lines 244..250
LowVoltage/actions/put_item.py on lines 268..274
LowVoltage/actions/put_item.py on lines 288..294
LowVoltage/actions/put_item.py on lines 298..304
LowVoltage/actions/put_item.py on lines 308..314
LowVoltage/actions/put_item.py on lines 318..324
LowVoltage/actions/put_item.py on lines 328..334
LowVoltage/actions/update_item.py on lines 542..548
LowVoltage/actions/update_item.py on lines 552..558
LowVoltage/actions/update_item.py on lines 562..568
LowVoltage/actions/update_item.py on lines 572..578
LowVoltage/actions/update_item.py on lines 582..588
LowVoltage/actions/update_item.py on lines 592..598
LowVoltage/actions/update_item.py on lines 602..608
LowVoltage/actions/update_item.py on lines 612..618
LowVoltage/actions/update_item.py on lines 622..628
LowVoltage/actions/update_item.py on lines 632..638

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

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 test_consistent_read_true(self):
        self.assertEqual(
            GetItem("Table", {"hash": u"h"}).consistent_read_true().payload,
            {
                "TableName": "Table",
Severity: Major
Found in LowVoltage/actions/get_item.py and 1 other location - About 1 hr to fix
LowVoltage/actions/get_item.py on lines 264..270

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

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

    def test_project_all_without_active_index(self):
        with self.assertRaises(_lv.BuilderError) as catcher:
            UpdateTable("Foo").project_all()
        self.assertEqual(catcher.exception.args, ("No active index or active index not being created.",))
Severity: Major
Found in LowVoltage/actions/update_table.py and 3 other locations - About 1 hr to fix
LowVoltage/actions/create_table.py on lines 553..556
LowVoltage/actions/create_table.py on lines 558..561
LowVoltage/actions/update_table.py on lines 540..543

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

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

    def test_project_keys_only_without_active_index(self):
        with self.assertRaises(_lv.BuilderError) as catcher:
            UpdateTable("Foo").project_keys_only()
        self.assertEqual(catcher.exception.args, ("No active index or active index not being created.",))
Severity: Major
Found in LowVoltage/actions/update_table.py and 3 other locations - About 1 hr to fix
LowVoltage/actions/create_table.py on lines 553..556
LowVoltage/actions/create_table.py on lines 558..561
LowVoltage/actions/update_table.py on lines 530..533

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

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

    def test_return_values_none(self):
        self.assertEqual(
            DeleteItem("Table", {"hash": u"h"}).return_values_none().payload,
            {
                "TableName": "Table",
Severity: Major
Found in LowVoltage/actions/delete_item.py and 25 other locations - About 1 hr to fix
LowVoltage/actions/delete_item.py on lines 292..298
LowVoltage/actions/delete_item.py on lines 302..308
LowVoltage/actions/delete_item.py on lines 312..318
LowVoltage/actions/delete_item.py on lines 322..328
LowVoltage/actions/delete_item.py on lines 332..338
LowVoltage/actions/delete_item.py on lines 342..348
LowVoltage/actions/get_item.py on lines 234..240
LowVoltage/actions/get_item.py on lines 244..250
LowVoltage/actions/put_item.py on lines 268..274
LowVoltage/actions/put_item.py on lines 278..284
LowVoltage/actions/put_item.py on lines 288..294
LowVoltage/actions/put_item.py on lines 298..304
LowVoltage/actions/put_item.py on lines 308..314
LowVoltage/actions/put_item.py on lines 318..324
LowVoltage/actions/put_item.py on lines 328..334
LowVoltage/actions/update_item.py on lines 542..548
LowVoltage/actions/update_item.py on lines 552..558
LowVoltage/actions/update_item.py on lines 562..568
LowVoltage/actions/update_item.py on lines 572..578
LowVoltage/actions/update_item.py on lines 582..588
LowVoltage/actions/update_item.py on lines 592..598
LowVoltage/actions/update_item.py on lines 602..608
LowVoltage/actions/update_item.py on lines 612..618
LowVoltage/actions/update_item.py on lines 622..628
LowVoltage/actions/update_item.py on lines 632..638

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

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

    def test_return_consumed_capacity_none(self):
        self.assertEqual(
            DeleteItem("Table", {"hash": u"h"}).return_consumed_capacity_none().payload,
            {
                "TableName": "Table",
Severity: Major
Found in LowVoltage/actions/delete_item.py and 25 other locations - About 1 hr to fix
LowVoltage/actions/delete_item.py on lines 282..288
LowVoltage/actions/delete_item.py on lines 292..298
LowVoltage/actions/delete_item.py on lines 302..308
LowVoltage/actions/delete_item.py on lines 312..318
LowVoltage/actions/delete_item.py on lines 332..338
LowVoltage/actions/delete_item.py on lines 342..348
LowVoltage/actions/get_item.py on lines 234..240
LowVoltage/actions/get_item.py on lines 244..250
LowVoltage/actions/put_item.py on lines 268..274
LowVoltage/actions/put_item.py on lines 278..284
LowVoltage/actions/put_item.py on lines 288..294
LowVoltage/actions/put_item.py on lines 298..304
LowVoltage/actions/put_item.py on lines 308..314
LowVoltage/actions/put_item.py on lines 318..324
LowVoltage/actions/put_item.py on lines 328..334
LowVoltage/actions/update_item.py on lines 542..548
LowVoltage/actions/update_item.py on lines 552..558
LowVoltage/actions/update_item.py on lines 562..568
LowVoltage/actions/update_item.py on lines 572..578
LowVoltage/actions/update_item.py on lines 582..588
LowVoltage/actions/update_item.py on lines 592..598
LowVoltage/actions/update_item.py on lines 602..608
LowVoltage/actions/update_item.py on lines 612..618
LowVoltage/actions/update_item.py on lines 622..628
LowVoltage/actions/update_item.py on lines 632..638

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

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

    def test_return_consumed_capacity_total(self):
        self.assertEqual(
            UpdateItem("Table", {"hash": u"h"}).return_consumed_capacity_total().payload,
            {
                "TableName": "Table",
Severity: Major
Found in LowVoltage/actions/update_item.py and 25 other locations - About 1 hr to fix
LowVoltage/actions/delete_item.py on lines 282..288
LowVoltage/actions/delete_item.py on lines 292..298
LowVoltage/actions/delete_item.py on lines 302..308
LowVoltage/actions/delete_item.py on lines 312..318
LowVoltage/actions/delete_item.py on lines 322..328
LowVoltage/actions/delete_item.py on lines 332..338
LowVoltage/actions/delete_item.py on lines 342..348
LowVoltage/actions/get_item.py on lines 234..240
LowVoltage/actions/get_item.py on lines 244..250
LowVoltage/actions/put_item.py on lines 268..274
LowVoltage/actions/put_item.py on lines 278..284
LowVoltage/actions/put_item.py on lines 288..294
LowVoltage/actions/put_item.py on lines 298..304
LowVoltage/actions/put_item.py on lines 308..314
LowVoltage/actions/put_item.py on lines 318..324
LowVoltage/actions/put_item.py on lines 328..334
LowVoltage/actions/update_item.py on lines 542..548
LowVoltage/actions/update_item.py on lines 552..558
LowVoltage/actions/update_item.py on lines 562..568
LowVoltage/actions/update_item.py on lines 572..578
LowVoltage/actions/update_item.py on lines 582..588
LowVoltage/actions/update_item.py on lines 602..608
LowVoltage/actions/update_item.py on lines 612..618
LowVoltage/actions/update_item.py on lines 622..628
LowVoltage/actions/update_item.py on lines 632..638

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

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