tensorflow/tensorflow

View on GitHub
tensorflow/python/framework/type_spec_test.py

Summary

Maintainability
F
2 wks
Test Coverage

File type_spec_test.py has 787 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Severity: Major
Found in tensorflow/python/framework/type_spec_test.py - About 1 day to fix

    TypeSpecTest has 30 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class TypeSpecTest(test_util.TensorFlowTestCase, parameterized.TestCase):
    
      @parameterized.named_parameters(
          ("FullySpecified",
           TwoTensorsSpec([5, 3], dtypes.int32, [3], dtypes.bool),
    Severity: Minor
    Found in tensorflow/python/framework/type_spec_test.py - About 3 hrs to fix

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

        def __init__(self, x_shape, x_dtype, y_shape, y_dtype, color="red"):
      Severity: Minor
      Found in tensorflow/python/framework/type_spec_test.py - About 35 mins to fix

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

          def testToBatchedTensorList(self):
            a = TwoComposites(
                ragged_factory_ops.constant([[1, 2], [3]]),
                ragged_factory_ops.constant([[5], [6, 7, 8]]))
            a_spec = type_spec.type_spec_from_value(a)
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 1 other location - About 2 days to fix
        tensorflow/python/framework/type_spec_test.py on lines 878..898

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

        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 testToTensorList(self):
            a = TwoComposites(
                ragged_factory_ops.constant([[1, 2], [3]]),
                ragged_factory_ops.constant([[5], [6, 7, 8]]))
            a_spec = type_spec.type_spec_from_value(a)
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 1 other location - About 2 days to fix
        tensorflow/python/framework/type_spec_test.py on lines 900..920

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

        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

              ("NamedTuple",
               NestOfTensorsSpec(_TestNamedTuple(
                   a=tensor_spec.TensorSpec((), dtypes.int32),
                   b=tensor_spec.TensorSpec((), dtypes.int32))),
               NestOfTensorsSpec(_TestNamedTuple(
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 1 other location - About 6 hrs to fix
        tensorflow/python/framework/type_spec_test.py on lines 546..555

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

        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

              ("NamedTupleRedefined",
               NestOfTensorsSpec(_TestNamedTuple(
                   a=tensor_spec.TensorSpec((), dtypes.int32),
                   b=tensor_spec.TensorSpec((), dtypes.int32))),
               NestOfTensorsSpec(_TestNamedTuple2(  # Separate but equivalent type.
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 1 other location - About 6 hrs to fix
        tensorflow/python/framework/type_spec_test.py on lines 536..545

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

        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

              ("NamedTuple",
               NestOfTensorsSpec(_TestNamedTuple(
                   a=tensor_spec.TensorSpec([None, 5], dtypes.int32),
                   b=tensor_spec.TensorSpec([None, None], dtypes.int32))),
               NestOfTensorsSpec(_TestNamedTuple(
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 1 other location - About 4 hrs to fix
        tensorflow/python/framework/type_spec_test.py on lines 482..488

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

        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

              ("NamedTuple",
               NestOfTensorsSpec(
                   _TestNamedTuple(
                       a=tensor_spec.TensorSpec([8, 5], dtypes.int32),
                       b=tensor_spec.TensorSpec([8, 12], dtypes.int32))),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 1 other location - About 4 hrs to fix
        tensorflow/python/framework/type_spec_test.py on lines 311..319

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

        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

                  "NamedTupleRedefined",
                  NestOfTensorsSpec(
                      _TestNamedTuple2(  # Separate but equivalent type.
                          a=tensor_spec.TensorSpec([8, 5], dtypes.int32),
                          b=tensor_spec.TensorSpec([8, 12], dtypes.int32))),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 1 other location - About 4 hrs to fix
        tensorflow/python/framework/type_spec_test.py on lines 301..309

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

        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

              ("NamedTupleRedefined",
               NestOfTensorsSpec(_TestNamedTuple(
                   a=tensor_spec.TensorSpec([None, 5], dtypes.int32),
                   b=tensor_spec.TensorSpec([None, None], dtypes.int32))),
               NestOfTensorsSpec(_TestNamedTuple2(  # Separate but equivalent type.
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 1 other location - About 4 hrs to fix
        tensorflow/python/framework/type_spec_test.py on lines 475..481

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

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

              ("IncompatibleNestType",
               NestOfTensorsSpec(_TestNamedTuple(
                   a=tensor_spec.TensorSpec((), dtypes.int32),
                   b=tensor_spec.TensorSpec((), dtypes.int32))),
               NestOfTensorsSpec(dict(
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 2 other locations - About 3 hrs to fix
        tensorflow/python/framework/type_spec_test.py on lines 605..611
        tensorflow/python/framework/type_spec_test.py on lines 618..624

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

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

              ("IncompatibleDtype",
               NestOfTensorsSpec(_TestNamedTuple(
                   a=tensor_spec.TensorSpec((), dtypes.int32),
                   b=tensor_spec.TensorSpec((), dtypes.bool))),
               NestOfTensorsSpec(_TestNamedTuple(
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 2 other locations - About 3 hrs to fix
        tensorflow/python/framework/type_spec_test.py on lines 573..579
        tensorflow/python/framework/type_spec_test.py on lines 618..624

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

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

              ("DifferentFieldName",
               NestOfTensorsSpec(_TestNamedTuple(
                   a=tensor_spec.TensorSpec((), dtypes.int32),
                   b=tensor_spec.TensorSpec((), dtypes.int32))),
               NestOfTensorsSpec(_TestNamedTupleDifferentField(
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 2 other locations - About 3 hrs to fix
        tensorflow/python/framework/type_spec_test.py on lines 573..579
        tensorflow/python/framework/type_spec_test.py on lines 605..611

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

        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

              ("DiffMetadataTensorSpecName",
               TwoTensorsSpec([5, 3], dtypes.int32, [3], dtypes.bool,
                              tensor_spec.TensorSpec([4], name="a")),
               TwoTensorsSpec([5, 3], dtypes.int32, [3], dtypes.bool,
                              tensor_spec.TensorSpec([4], name="b"))),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 1 other location - About 3 hrs to fix
        tensorflow/python/framework/type_spec_test.py on lines 568..572

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

        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

              ("IncompatibleTensorSpecName",
               TwoTensorsSpec([5, 3], dtypes.int32, [3], dtypes.bool,
                              tensor_spec.TensorSpec([4], name="a")),
               TwoTensorsSpec([5, 3], dtypes.int32, [3], dtypes.bool,
                              tensor_spec.TensorSpec([4], name="b"))),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 1 other location - About 3 hrs to fix
        tensorflow/python/framework/type_spec_test.py on lines 279..283

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

        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

        class TwoTensors:
          """A simple value type to test TypeSpec.
        
          Contains two tensors (x, y) and a string (color).  The color value is a
          stand-in for any extra type metadata we might need to store.
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 1 other location - About 2 hrs to fix
        tensorflow/python/framework/type_spec_test.py on lines 111..121

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

        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

        class TwoComposites:
          """A simple value type to test TypeSpec.
        
          Contains two composite tensorstensors (x, y) and a string (color).
          """
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 1 other location - About 2 hrs to fix
        tensorflow/python/framework/type_spec_test.py on lines 41..52

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

        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

              {
                  "unbatched":
                      TwoCompositesSpec(
                          ragged_tensor.RaggedTensorSpec([3, None]),
                          tensor_spec.TensorSpec([8])),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 1 other location - About 2 hrs to fix
        tensorflow/python/framework/type_spec_test.py on lines 821..831

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

        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

              {
                  "unbatched":
                      TwoCompositesSpec(
                          tensor_spec.TensorSpec([3, None]),
                          tensor_spec.TensorSpec([8])),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 1 other location - About 2 hrs to fix
        tensorflow/python/framework/type_spec_test.py on lines 833..843

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

        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

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

               TwoTensorsSpec([5, 3], dtypes.int32, [3], dtypes.bool,
                              (np.int32(1), np.float32(1.),
                               np.array([[1, 2], [3, 4]]))),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 1 other location - About 1 hr to fix
        tensorflow/python/framework/type_spec_test.py on lines 240..242

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

        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

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

               TwoTensorsSpec([5, 3], dtypes.int32, [3], dtypes.bool,
                              (np.int32(1), np.float32(1.),
                               np.array([[1, 2], [3, 4]])))),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 1 other location - About 1 hr to fix
        tensorflow/python/framework/type_spec_test.py on lines 237..239

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

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

            bar = TwoComposites(
                ragged_factory_ops.constant([[1, 2], [3]], dtypes.int32),
                ragged_factory_ops.constant([[5], [6, 7, 8]], dtypes.float32))
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 2 other locations - About 1 hr to fix
        tensorflow/python/framework/type_spec_test.py on lines 422..424
        tensorflow/python/framework/type_spec_test.py on lines 455..457

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

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

            value = TwoComposites(
                ragged_factory_ops.constant([[1, 2], [3]], dtypes.int32),
                ragged_factory_ops.constant([[5], [6, 7, 8]], dtypes.float32),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 2 other locations - About 1 hr to fix
        tensorflow/python/framework/type_spec_test.py on lines 455..457
        tensorflow/python/framework/type_spec_test.py on lines 707..709

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

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

            value = TwoComposites(
                ragged_factory_ops.constant([[1, 2], [3]], dtypes.int32),
                ragged_factory_ops.constant([[5], [6, 7, 8]], dtypes.float32),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 2 other locations - About 1 hr to fix
        tensorflow/python/framework/type_spec_test.py on lines 422..424
        tensorflow/python/framework/type_spec_test.py on lines 707..709

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

        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

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

          @parameterized.named_parameters(
              ("IncompatibleDtype",
               TwoTensorsSpec([5, 3], dtypes.int32, [None], dtypes.bool),
               TwoTensorsSpec([5, 3], dtypes.int32, [None], dtypes.float32)),
              ("IncompatibleMetadata",
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 1 other location - About 1 hr to fix
        tensorflow/python/framework/type_spec_test.py on lines 604..637

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

        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

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

          @parameterized.named_parameters(
              ("IncompatibleDtype",
               NestOfTensorsSpec(_TestNamedTuple(
                   a=tensor_spec.TensorSpec((), dtypes.int32),
                   b=tensor_spec.TensorSpec((), dtypes.bool))),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 1 other location - About 1 hr to fix
        tensorflow/python/framework/type_spec_test.py on lines 561..585

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

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

              ("DifferentMetadata",
               TwoTensorsSpec([5, 3], dtypes.int32, [3], dtypes.bool, "red"),
               TwoTensorsSpec([5, 3], dtypes.int32, [3], dtypes.bool, "blue")),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 4 other locations - About 1 hr to fix
        tensorflow/python/framework/type_spec_test.py on lines 233..235
        tensorflow/python/framework/type_spec_test.py on lines 268..270
        tensorflow/python/framework/type_spec_test.py on lines 403..405
        tensorflow/python/framework/type_spec_test.py on lines 504..506

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

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

              ("DifferentMetadata",
               TwoTensorsSpec([5, 3], dtypes.int32, [3], dtypes.bool, "red"),
               TwoTensorsSpec([5, 3], dtypes.int32, [3], dtypes.bool, "blue")),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 4 other locations - About 1 hr to fix
        tensorflow/python/framework/type_spec_test.py on lines 233..235
        tensorflow/python/framework/type_spec_test.py on lines 268..270
        tensorflow/python/framework/type_spec_test.py on lines 338..340
        tensorflow/python/framework/type_spec_test.py on lines 504..506

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

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

              ("IncompatibleMetadata",
               TwoTensorsSpec([5, 3], dtypes.int32, [3], dtypes.bool, "red"),
               TwoTensorsSpec([5, 3], dtypes.int32, [3], dtypes.bool, "blue")),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 4 other locations - About 1 hr to fix
        tensorflow/python/framework/type_spec_test.py on lines 233..235
        tensorflow/python/framework/type_spec_test.py on lines 268..270
        tensorflow/python/framework/type_spec_test.py on lines 338..340
        tensorflow/python/framework/type_spec_test.py on lines 403..405

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

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

              ("Metadata",
               TwoTensorsSpec([5, 3], dtypes.int32, [3], dtypes.bool, "blue"),
               TwoTensorsSpec([5, 3], dtypes.int32, [3], dtypes.bool, "blue")),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 4 other locations - About 1 hr to fix
        tensorflow/python/framework/type_spec_test.py on lines 268..270
        tensorflow/python/framework/type_spec_test.py on lines 338..340
        tensorflow/python/framework/type_spec_test.py on lines 403..405
        tensorflow/python/framework/type_spec_test.py on lines 504..506

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

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

              ("IncompatibleMetadata",
               TwoTensorsSpec([5, 3], dtypes.int32, [3], dtypes.bool, "red"),
               TwoTensorsSpec([5, 3], dtypes.int32, [3], dtypes.bool, "blue")),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 4 other locations - About 1 hr to fix
        tensorflow/python/framework/type_spec_test.py on lines 233..235
        tensorflow/python/framework/type_spec_test.py on lines 338..340
        tensorflow/python/framework/type_spec_test.py on lines 403..405
        tensorflow/python/framework/type_spec_test.py on lines 504..506

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

        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

              ("SerializeDifferentOrder",
               TwoTensorsSpecVariableSerialize([5, None], dtypes.int32, [None],
                                               dtypes.bool),
               TwoTensorsSpecVariableSerialize([5, None], dtypes.int32, [None],
                                               dtypes.bool, "different_order")),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 3 other locations - About 55 mins to fix
        tensorflow/python/framework/type_spec_test.py on lines 350..354
        tensorflow/python/framework/type_spec_test.py on lines 355..359
        tensorflow/python/framework/type_spec_test.py on lines 406..410

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

        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

              ("SerializeDifferentStructure",
               TwoTensorsSpecVariableSerialize([5, None], dtypes.int32, [None],
                                               dtypes.bool),
               TwoTensorsSpecVariableSerialize([5, None], dtypes.int32, [None],
                                               dtypes.bool, "smaller_tuple")),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 3 other locations - About 55 mins to fix
        tensorflow/python/framework/type_spec_test.py on lines 350..354
        tensorflow/python/framework/type_spec_test.py on lines 355..359
        tensorflow/python/framework/type_spec_test.py on lines 411..415

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

        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

              ("SerializeDifferentStructure",
               TwoTensorsSpecVariableSerialize([5, None], dtypes.int32, [None],
                                               dtypes.bool),
               TwoTensorsSpecVariableSerialize([5, None], dtypes.int32, [None],
                                               dtypes.bool, "smaller_tuple")),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 3 other locations - About 55 mins to fix
        tensorflow/python/framework/type_spec_test.py on lines 355..359
        tensorflow/python/framework/type_spec_test.py on lines 406..410
        tensorflow/python/framework/type_spec_test.py on lines 411..415

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

        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

              ("SerializeDifferentOrder",
               TwoTensorsSpecVariableSerialize([5, None], dtypes.int32, [None],
                                               dtypes.bool),
               TwoTensorsSpecVariableSerialize([5, None], dtypes.int32, [None],
                                               dtypes.bool, "different_order")),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 3 other locations - About 55 mins to fix
        tensorflow/python/framework/type_spec_test.py on lines 350..354
        tensorflow/python/framework/type_spec_test.py on lines 406..410
        tensorflow/python/framework/type_spec_test.py on lines 411..415

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

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

              ("DifferentRank", TwoTensorsSpec([5, 3], dtypes.int32, [None],
                                               dtypes.bool),
               TwoTensorsSpec([5, 3], dtypes.int32, [None, None], dtypes.bool)),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 2 other locations - About 55 mins to fix
        tensorflow/python/framework/type_spec_test.py on lines 262..264
        tensorflow/python/framework/type_spec_test.py on lines 498..500

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

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

              ("IncompatibleRank",
               TwoTensorsSpec([5, 3], dtypes.int32, [None], dtypes.bool),
               TwoTensorsSpec([5, 3], dtypes.int32, [None, None], dtypes.bool)),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 2 other locations - About 55 mins to fix
        tensorflow/python/framework/type_spec_test.py on lines 332..334
        tensorflow/python/framework/type_spec_test.py on lines 498..500

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

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

              ("IncompatibleRank",
               TwoTensorsSpec([5, 3], dtypes.int32, [None], dtypes.bool),
               TwoTensorsSpec([5, 3], dtypes.int32, [None, None], dtypes.bool)),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 2 other locations - About 55 mins to fix
        tensorflow/python/framework/type_spec_test.py on lines 262..264
        tensorflow/python/framework/type_spec_test.py on lines 332..334

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

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

              ("IncompatibleDtype",
               TwoTensorsSpec([5, 3], dtypes.int32, [None], dtypes.bool),
               TwoTensorsSpec([5, 3], dtypes.int32, [None], dtypes.float32)),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 12 other locations - About 50 mins to fix
        tensorflow/python/framework/type_spec_test.py on lines 265..267
        tensorflow/python/framework/type_spec_test.py on lines 295..296
        tensorflow/python/framework/type_spec_test.py on lines 325..327
        tensorflow/python/framework/type_spec_test.py on lines 329..331
        tensorflow/python/framework/type_spec_test.py on lines 335..337
        tensorflow/python/framework/type_spec_test.py on lines 344..346
        tensorflow/python/framework/type_spec_test.py on lines 396..398
        tensorflow/python/framework/type_spec_test.py on lines 400..402
        tensorflow/python/framework/type_spec_test.py on lines 466..468
        tensorflow/python/framework/type_spec_test.py on lines 495..497
        tensorflow/python/framework/type_spec_test.py on lines 501..503
        tensorflow/python/framework/type_spec_test.py on lines 562..564

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

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

              ("SameValue", TwoTensorsSpec([5, 3], dtypes.int32, [None], dtypes.bool),
               TwoTensorsSpec([5, 3], dtypes.int32, [None], dtypes.bool)),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 12 other locations - About 50 mins to fix
        tensorflow/python/framework/type_spec_test.py on lines 259..261
        tensorflow/python/framework/type_spec_test.py on lines 265..267
        tensorflow/python/framework/type_spec_test.py on lines 325..327
        tensorflow/python/framework/type_spec_test.py on lines 329..331
        tensorflow/python/framework/type_spec_test.py on lines 335..337
        tensorflow/python/framework/type_spec_test.py on lines 344..346
        tensorflow/python/framework/type_spec_test.py on lines 396..398
        tensorflow/python/framework/type_spec_test.py on lines 400..402
        tensorflow/python/framework/type_spec_test.py on lines 466..468
        tensorflow/python/framework/type_spec_test.py on lines 495..497
        tensorflow/python/framework/type_spec_test.py on lines 501..503
        tensorflow/python/framework/type_spec_test.py on lines 562..564

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

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

              ("SameValue",
               TwoTensorsSpec([5, 3], dtypes.int32, [None], dtypes.bool),
               TwoTensorsSpec([5, 3], dtypes.int32, [None], dtypes.bool)),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 12 other locations - About 50 mins to fix
        tensorflow/python/framework/type_spec_test.py on lines 259..261
        tensorflow/python/framework/type_spec_test.py on lines 265..267
        tensorflow/python/framework/type_spec_test.py on lines 295..296
        tensorflow/python/framework/type_spec_test.py on lines 325..327
        tensorflow/python/framework/type_spec_test.py on lines 329..331
        tensorflow/python/framework/type_spec_test.py on lines 335..337
        tensorflow/python/framework/type_spec_test.py on lines 344..346
        tensorflow/python/framework/type_spec_test.py on lines 396..398
        tensorflow/python/framework/type_spec_test.py on lines 400..402
        tensorflow/python/framework/type_spec_test.py on lines 495..497
        tensorflow/python/framework/type_spec_test.py on lines 501..503
        tensorflow/python/framework/type_spec_test.py on lines 562..564

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

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

              ("SwappedDimensions",
               TwoTensorsSpec([3, 5], dtypes.int32, [None], dtypes.int32),
               TwoTensorsSpec([5, 3], dtypes.int32, [None], dtypes.int32)),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 12 other locations - About 50 mins to fix
        tensorflow/python/framework/type_spec_test.py on lines 259..261
        tensorflow/python/framework/type_spec_test.py on lines 265..267
        tensorflow/python/framework/type_spec_test.py on lines 295..296
        tensorflow/python/framework/type_spec_test.py on lines 325..327
        tensorflow/python/framework/type_spec_test.py on lines 329..331
        tensorflow/python/framework/type_spec_test.py on lines 335..337
        tensorflow/python/framework/type_spec_test.py on lines 396..398
        tensorflow/python/framework/type_spec_test.py on lines 400..402
        tensorflow/python/framework/type_spec_test.py on lines 466..468
        tensorflow/python/framework/type_spec_test.py on lines 495..497
        tensorflow/python/framework/type_spec_test.py on lines 501..503
        tensorflow/python/framework/type_spec_test.py on lines 562..564

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

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

              ("DifferentType",
               TwoTensorsSpec([5, 3], dtypes.int32, [None], dtypes.bool),
               TwoTensorsSpecTwin([5, 3], dtypes.int32, [None], dtypes.bool),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 12 other locations - About 50 mins to fix
        tensorflow/python/framework/type_spec_test.py on lines 259..261
        tensorflow/python/framework/type_spec_test.py on lines 265..267
        tensorflow/python/framework/type_spec_test.py on lines 295..296
        tensorflow/python/framework/type_spec_test.py on lines 325..327
        tensorflow/python/framework/type_spec_test.py on lines 329..331
        tensorflow/python/framework/type_spec_test.py on lines 335..337
        tensorflow/python/framework/type_spec_test.py on lines 344..346
        tensorflow/python/framework/type_spec_test.py on lines 400..402
        tensorflow/python/framework/type_spec_test.py on lines 466..468
        tensorflow/python/framework/type_spec_test.py on lines 495..497
        tensorflow/python/framework/type_spec_test.py on lines 501..503
        tensorflow/python/framework/type_spec_test.py on lines 562..564

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

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

              ("IncompatibleDtype",
               TwoTensorsSpec([5, 3], dtypes.int32, [None], dtypes.bool),
               TwoTensorsSpec([5, 3], dtypes.int32, [None], dtypes.float32)),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 12 other locations - About 50 mins to fix
        tensorflow/python/framework/type_spec_test.py on lines 259..261
        tensorflow/python/framework/type_spec_test.py on lines 265..267
        tensorflow/python/framework/type_spec_test.py on lines 295..296
        tensorflow/python/framework/type_spec_test.py on lines 325..327
        tensorflow/python/framework/type_spec_test.py on lines 329..331
        tensorflow/python/framework/type_spec_test.py on lines 335..337
        tensorflow/python/framework/type_spec_test.py on lines 344..346
        tensorflow/python/framework/type_spec_test.py on lines 396..398
        tensorflow/python/framework/type_spec_test.py on lines 400..402
        tensorflow/python/framework/type_spec_test.py on lines 466..468
        tensorflow/python/framework/type_spec_test.py on lines 501..503
        tensorflow/python/framework/type_spec_test.py on lines 562..564

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

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

              ("IncompatibleDimSize",
               TwoTensorsSpec([5, 3], dtypes.int32, [None], dtypes.bool),
               TwoTensorsSpec([5, 8], dtypes.int32, [None], dtypes.bool)),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 12 other locations - About 50 mins to fix
        tensorflow/python/framework/type_spec_test.py on lines 259..261
        tensorflow/python/framework/type_spec_test.py on lines 265..267
        tensorflow/python/framework/type_spec_test.py on lines 295..296
        tensorflow/python/framework/type_spec_test.py on lines 325..327
        tensorflow/python/framework/type_spec_test.py on lines 329..331
        tensorflow/python/framework/type_spec_test.py on lines 335..337
        tensorflow/python/framework/type_spec_test.py on lines 344..346
        tensorflow/python/framework/type_spec_test.py on lines 396..398
        tensorflow/python/framework/type_spec_test.py on lines 400..402
        tensorflow/python/framework/type_spec_test.py on lines 466..468
        tensorflow/python/framework/type_spec_test.py on lines 495..497
        tensorflow/python/framework/type_spec_test.py on lines 562..564

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

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

              ("DifferentDimSize",
               TwoTensorsSpec([5, 3], dtypes.int32, [None], dtypes.bool),
               TwoTensorsSpec([5, 8], dtypes.int32, [None], dtypes.bool)),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 12 other locations - About 50 mins to fix
        tensorflow/python/framework/type_spec_test.py on lines 259..261
        tensorflow/python/framework/type_spec_test.py on lines 265..267
        tensorflow/python/framework/type_spec_test.py on lines 295..296
        tensorflow/python/framework/type_spec_test.py on lines 325..327
        tensorflow/python/framework/type_spec_test.py on lines 329..331
        tensorflow/python/framework/type_spec_test.py on lines 344..346
        tensorflow/python/framework/type_spec_test.py on lines 396..398
        tensorflow/python/framework/type_spec_test.py on lines 400..402
        tensorflow/python/framework/type_spec_test.py on lines 466..468
        tensorflow/python/framework/type_spec_test.py on lines 495..497
        tensorflow/python/framework/type_spec_test.py on lines 501..503
        tensorflow/python/framework/type_spec_test.py on lines 562..564

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

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

              ("IncompatibleDimSize",
               TwoTensorsSpec([5, 3], dtypes.int32, [None], dtypes.bool),
               TwoTensorsSpec([5, 8], dtypes.int32, [None], dtypes.bool)),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 12 other locations - About 50 mins to fix
        tensorflow/python/framework/type_spec_test.py on lines 259..261
        tensorflow/python/framework/type_spec_test.py on lines 295..296
        tensorflow/python/framework/type_spec_test.py on lines 325..327
        tensorflow/python/framework/type_spec_test.py on lines 329..331
        tensorflow/python/framework/type_spec_test.py on lines 335..337
        tensorflow/python/framework/type_spec_test.py on lines 344..346
        tensorflow/python/framework/type_spec_test.py on lines 396..398
        tensorflow/python/framework/type_spec_test.py on lines 400..402
        tensorflow/python/framework/type_spec_test.py on lines 466..468
        tensorflow/python/framework/type_spec_test.py on lines 495..497
        tensorflow/python/framework/type_spec_test.py on lines 501..503
        tensorflow/python/framework/type_spec_test.py on lines 562..564

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

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

              ("DifferentType",
               TwoTensorsSpec([5, 3], dtypes.int32, [None], dtypes.bool),
               TwoTensorsSpecTwin([5, 3], dtypes.int32, [None], dtypes.bool),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 12 other locations - About 50 mins to fix
        tensorflow/python/framework/type_spec_test.py on lines 259..261
        tensorflow/python/framework/type_spec_test.py on lines 265..267
        tensorflow/python/framework/type_spec_test.py on lines 295..296
        tensorflow/python/framework/type_spec_test.py on lines 329..331
        tensorflow/python/framework/type_spec_test.py on lines 335..337
        tensorflow/python/framework/type_spec_test.py on lines 344..346
        tensorflow/python/framework/type_spec_test.py on lines 396..398
        tensorflow/python/framework/type_spec_test.py on lines 400..402
        tensorflow/python/framework/type_spec_test.py on lines 466..468
        tensorflow/python/framework/type_spec_test.py on lines 495..497
        tensorflow/python/framework/type_spec_test.py on lines 501..503
        tensorflow/python/framework/type_spec_test.py on lines 562..564

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

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

              ("DifferentDtype",
               TwoTensorsSpec([5, 3], dtypes.int32, [None], dtypes.bool),
               TwoTensorsSpec([5, 3], dtypes.int32, [None], dtypes.float32)),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 12 other locations - About 50 mins to fix
        tensorflow/python/framework/type_spec_test.py on lines 259..261
        tensorflow/python/framework/type_spec_test.py on lines 265..267
        tensorflow/python/framework/type_spec_test.py on lines 295..296
        tensorflow/python/framework/type_spec_test.py on lines 325..327
        tensorflow/python/framework/type_spec_test.py on lines 329..331
        tensorflow/python/framework/type_spec_test.py on lines 335..337
        tensorflow/python/framework/type_spec_test.py on lines 344..346
        tensorflow/python/framework/type_spec_test.py on lines 396..398
        tensorflow/python/framework/type_spec_test.py on lines 466..468
        tensorflow/python/framework/type_spec_test.py on lines 495..497
        tensorflow/python/framework/type_spec_test.py on lines 501..503
        tensorflow/python/framework/type_spec_test.py on lines 562..564

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

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

              ("DifferentDtype",
               TwoTensorsSpec([5, 3], dtypes.int32, [None], dtypes.bool),
               TwoTensorsSpec([5, 3], dtypes.int32, [None], dtypes.float32)),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 12 other locations - About 50 mins to fix
        tensorflow/python/framework/type_spec_test.py on lines 259..261
        tensorflow/python/framework/type_spec_test.py on lines 265..267
        tensorflow/python/framework/type_spec_test.py on lines 295..296
        tensorflow/python/framework/type_spec_test.py on lines 325..327
        tensorflow/python/framework/type_spec_test.py on lines 335..337
        tensorflow/python/framework/type_spec_test.py on lines 344..346
        tensorflow/python/framework/type_spec_test.py on lines 396..398
        tensorflow/python/framework/type_spec_test.py on lines 400..402
        tensorflow/python/framework/type_spec_test.py on lines 466..468
        tensorflow/python/framework/type_spec_test.py on lines 495..497
        tensorflow/python/framework/type_spec_test.py on lines 501..503
        tensorflow/python/framework/type_spec_test.py on lines 562..564

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

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

              ("IncompatibleDtype",
               TwoTensorsSpec([5, 3], dtypes.int32, [None], dtypes.bool),
               TwoTensorsSpec([5, 3], dtypes.int32, [None], dtypes.float32)),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 12 other locations - About 50 mins to fix
        tensorflow/python/framework/type_spec_test.py on lines 259..261
        tensorflow/python/framework/type_spec_test.py on lines 265..267
        tensorflow/python/framework/type_spec_test.py on lines 295..296
        tensorflow/python/framework/type_spec_test.py on lines 325..327
        tensorflow/python/framework/type_spec_test.py on lines 329..331
        tensorflow/python/framework/type_spec_test.py on lines 335..337
        tensorflow/python/framework/type_spec_test.py on lines 344..346
        tensorflow/python/framework/type_spec_test.py on lines 396..398
        tensorflow/python/framework/type_spec_test.py on lines 400..402
        tensorflow/python/framework/type_spec_test.py on lines 466..468
        tensorflow/python/framework/type_spec_test.py on lines 495..497
        tensorflow/python/framework/type_spec_test.py on lines 501..503

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

        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

        Identical blocks of code found in 3 locations. Consider refactoring.
        Open

              ("SwappedValues",
               TwoTensorsSpec([5, 3], dtypes.int32, [None], dtypes.bool),
               TwoTensorsSpec([None], dtypes.bool, [5, 3], dtypes.int32)),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 2 other locations - About 50 mins to fix
        tensorflow/python/framework/type_spec_test.py on lines 271..273
        tensorflow/python/framework/type_spec_test.py on lines 341..343

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

        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

        Identical blocks of code found in 3 locations. Consider refactoring.
        Open

              ("SwappedValues", TwoTensorsSpec([5, 3], dtypes.int32, [None],
                                               dtypes.bool),
               TwoTensorsSpec([None], dtypes.bool, [5, 3], dtypes.int32)),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 2 other locations - About 50 mins to fix
        tensorflow/python/framework/type_spec_test.py on lines 271..273
        tensorflow/python/framework/type_spec_test.py on lines 507..509

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

        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

        Identical blocks of code found in 3 locations. Consider refactoring.
        Open

              ("SwappedValues",
               TwoTensorsSpec([5, 3], dtypes.int32, [None], dtypes.bool),
               TwoTensorsSpec([None], dtypes.bool, [5, 3], dtypes.int32)),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 2 other locations - About 50 mins to fix
        tensorflow/python/framework/type_spec_test.py on lines 341..343
        tensorflow/python/framework/type_spec_test.py on lines 507..509

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

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

              ("Supertype", TwoTensorsSpec([5, None], dtypes.int32, [None],
                                           dtypes.bool),
               TwoTensorsSpec([5, 3], dtypes.int32, [8], dtypes.bool)),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 2 other locations - About 50 mins to fix
        tensorflow/python/framework/type_spec_test.py on lines 253..255
        tensorflow/python/framework/type_spec_test.py on lines 469..471

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

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

              ("UnknownDim",
               TwoTensorsSpec([5, None], dtypes.int32, [None], dtypes.bool),
               TwoTensorsSpec([5, 3], dtypes.int32, [8], dtypes.bool)),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 2 other locations - About 50 mins to fix
        tensorflow/python/framework/type_spec_test.py on lines 347..349
        tensorflow/python/framework/type_spec_test.py on lines 469..471

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

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

              ("UnknownDim",
               TwoTensorsSpec([5, None], dtypes.int32, [None], dtypes.bool),
               TwoTensorsSpec([5, 3], dtypes.int32, [8], dtypes.bool)),
        Severity: Major
        Found in tensorflow/python/framework/type_spec_test.py and 2 other locations - About 50 mins to fix
        tensorflow/python/framework/type_spec_test.py on lines 253..255
        tensorflow/python/framework/type_spec_test.py on lines 347..349

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

        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

               TwoTensorsSpec([5, 3], dtypes.int32, [3], dtypes.bool,
                              np.array([[1, 2], [3, 4]])),
        Severity: Minor
        Found in tensorflow/python/framework/type_spec_test.py and 1 other location - About 35 mins to fix
        tensorflow/python/framework/type_spec_test.py on lines 277..278

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

        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

               TwoTensorsSpec([5, 3], dtypes.int32, [3], dtypes.bool,
                              np.array([[1, 2], [3, 8]]))),
        Severity: Minor
        Found in tensorflow/python/framework/type_spec_test.py and 1 other location - About 35 mins to fix
        tensorflow/python/framework/type_spec_test.py on lines 275..276

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

        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

        There are no issues that match your filters.

        Category
        Status