tomography/xdesign

View on GitHub
src/xdesign/geometry/area.py

Summary

Maintainability
F
6 days
Test Coverage

Function contains has a Cognitive Complexity of 75 (exceeds 5 allowed). Consider refactoring.
Open

    def contains(self, other):
        """Return whether this Polygon contains the other."""

        if isinstance(other, Point):
            x = other._x
Severity: Minor
Found in src/xdesign/geometry/area.py - About 1 day to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function contains has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
Open

    def contains(self, other):
        """Return whether `other` is a proper subset.

        Return one boolean for all geometric entities. Return an array of
        boolean for array input.
Severity: Minor
Found in src/xdesign/geometry/area.py - About 5 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function contains has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    def contains(self, other):
        """Return whether this Mesh contains other.

        FOR ALL `x`,
        THERE EXISTS a face of the Mesh that contains `x`
Severity: Minor
Found in src/xdesign/geometry/area.py - About 1 hr to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Avoid deeply nested control flow statements.
Open

                        if self.contains(other.center):
                            for edge in self.edges:
                                if other.center.distance(edge) < other.radius:
                                    return False
                            return True
Severity: Major
Found in src/xdesign/geometry/area.py - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                            if self.contains(other.center):
                                for edge in self.edges:
                                    if other.center.distance(edge) < other.radius:
                                        return False
                                return True and not other.contains(-self)
    Severity: Major
    Found in src/xdesign/geometry/area.py - About 45 mins to fix

      Avoid too many return statements within this function.
      Open

                                  return True and not other.contains(-self)
      Severity: Major
      Found in src/xdesign/geometry/area.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                                return (
        Severity: Major
        Found in src/xdesign/geometry/area.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                      return border.contains_points(np.atleast_2d(x))
          Severity: Major
          Found in src/xdesign/geometry/area.py - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                        return np.sum((x - self.center._x)**2, axis=1) < self.radius**2
            Severity: Major
            Found in src/xdesign/geometry/area.py - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                                      return (
              Severity: Major
              Found in src/xdesign/geometry/area.py - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                                        return np.all(self.contains(x))
                Severity: Major
                Found in src/xdesign/geometry/area.py - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                                                      return False
                  Severity: Major
                  Found in src/xdesign/geometry/area.py - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                return np.logical_not(border.contains_points(np.atleast_2d(x)))
                    Severity: Major
                    Found in src/xdesign/geometry/area.py - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                              return (
                      Severity: Major
                      Found in src/xdesign/geometry/area.py - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                                return False
                        Severity: Major
                        Found in src/xdesign/geometry/area.py - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                      return np.sum((x - self.center._x)**2, axis=1) > self.radius**2
                          Severity: Major
                          Found in src/xdesign/geometry/area.py - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                                    return np.all(self.contains(x))
                            Severity: Major
                            Found in src/xdesign/geometry/area.py - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                                      return (
                              Severity: Major
                              Found in src/xdesign/geometry/area.py - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                                            return True
                                Severity: Major
                                Found in src/xdesign/geometry/area.py - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                                          return (-other).contains(-self)
                                  Severity: Major
                                  Found in src/xdesign/geometry/area.py - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                                            return (-other).contains(-self)
                                    Severity: Major
                                    Found in src/xdesign/geometry/area.py - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                                              return False
                                      Severity: Major
                                      Found in src/xdesign/geometry/area.py - About 30 mins to fix

                                        Function rotate has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                        Open

                                            def rotate(self, theta, point=None, axis=None):
                                                """Rotates the Polygon around an axis which passes through a point by
                                                theta radians."""
                                                for v in self.vertices:
                                                    v.rotate(theta, point, axis)
                                        Severity: Minor
                                        Found in src/xdesign/geometry/area.py - About 25 mins to fix

                                        Cognitive Complexity

                                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                        A method's cognitive complexity is based on a few simple rules:

                                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                        • Code is considered more complex for each "break in the linear flow of the code"
                                        • Code is considered more complex when "flow breaking structures are nested"

                                        Further reading

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

                                                            if isinstance(other, Circle):
                                                                return (
                                                                    other.center.distance(self.center) - other.radius >
                                                                    self.radius
                                                                )
                                        Severity: Major
                                        Found in src/xdesign/geometry/area.py and 1 other location - About 2 hrs to fix
                                        src/xdesign/geometry/area.py on lines 515..526

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

                                        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

                                                            if isinstance(other, Circle):
                                                                if self.contains(other.center):
                                                                    for edge in self.edges:
                                                                        if other.center.distance(edge) < other.radius:
                                                                            return False
                                        Severity: Major
                                        Found in src/xdesign/geometry/area.py and 1 other location - About 2 hrs to fix
                                        src/xdesign/geometry/area.py on lines 243..252

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

                                        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

                                                    p0 = Point(obj['vertices'][face[0], 0], obj['vertices'][face[0], 1])
                                        Severity: Major
                                        Found in src/xdesign/geometry/area.py and 2 other locations - About 2 hrs to fix
                                        src/xdesign/geometry/area.py on lines 702..702
                                        src/xdesign/geometry/area.py on lines 703..703

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

                                        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

                                                    p2 = Point(obj['vertices'][face[2], 0], obj['vertices'][face[2], 1])
                                        Severity: Major
                                        Found in src/xdesign/geometry/area.py and 2 other locations - About 2 hrs to fix
                                        src/xdesign/geometry/area.py on lines 701..701
                                        src/xdesign/geometry/area.py on lines 702..702

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

                                        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

                                                    p1 = Point(obj['vertices'][face[1], 0], obj['vertices'][face[1], 1])
                                        Severity: Major
                                        Found in src/xdesign/geometry/area.py and 2 other locations - About 2 hrs to fix
                                        src/xdesign/geometry/area.py on lines 701..701
                                        src/xdesign/geometry/area.py on lines 703..703

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

                                        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

                                                elif isinstance(other, Mesh):
                                                    for face in other.faces:
                                                        if not self.contains(face) and face.sign == 1:
                                                            return False
                                                    return True
                                        Severity: Major
                                        Found in src/xdesign/geometry/area.py and 1 other location - About 1 hr to fix
                                        src/xdesign/geometry/area.py on lines 218..222

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

                                        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

                                                elif isinstance(other, Mesh):
                                                    for face in other.faces:
                                                        if not self.contains(face) and face.sign == 1:
                                                            return False
                                                    return True
                                        Severity: Major
                                        Found in src/xdesign/geometry/area.py and 1 other location - About 1 hr to fix
                                        src/xdesign/geometry/area.py on lines 488..492

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

                                        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

                                                    edge = Line(
                                                        self.vertices[i], self.vertices[(i + 1) % self.numverts]
                                        Severity: Minor
                                        Found in src/xdesign/geometry/area.py and 1 other location - About 50 mins to fix
                                        src/xdesign/geometry/area.py on lines 376..378

                                        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

                                                    edges.append(
                                                        Segment(
                                                            self.vertices[i], self.vertices[(i + 1) % self.numverts]
                                        Severity: Minor
                                        Found in src/xdesign/geometry/area.py and 1 other location - About 50 mins to fix
                                        src/xdesign/geometry/area.py on lines 433..434

                                        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

                                            def __repr__(self):
                                                return "Ellipse(center={}, a={}, b={})".format(
                                                    repr(self.center), repr(self.a), repr(self.b)
                                        Severity: Major
                                        Found in src/xdesign/geometry/area.py and 2 other locations - About 45 mins to fix
                                        src/xdesign/geometry/area.py on lines 149..151
                                        src/xdesign/phantom/phantom.py on lines 156..158

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

                                        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

                                                            if isinstance(other, Circle):
                                                                return (
                                                                    other.center.distance(self.center) + other.radius <
                                                                    self.radius
                                                                )
                                        Severity: Minor
                                        Found in src/xdesign/geometry/area.py and 1 other location - About 45 mins to fix
                                        src/xdesign/geometry/area.py on lines 501..510

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

                                        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

                                                            if isinstance(other, Circle):
                                                                if self.contains(other.center):
                                                                    for edge in self.edges:
                                                                        if other.center.distance(edge) < other.radius:
                                                                            return False
                                        Severity: Minor
                                        Found in src/xdesign/geometry/area.py and 1 other location - About 45 mins to fix
                                        src/xdesign/geometry/area.py on lines 231..238

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

                                        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

                                            def __repr__(self):
                                                return "Circle(center={}, radius={}, sign={})".format(
                                                    repr(self.center), repr(self.radius), repr(self.sign)
                                        Severity: Major
                                        Found in src/xdesign/geometry/area.py and 2 other locations - About 45 mins to fix
                                        src/xdesign/geometry/area.py on lines 109..111
                                        src/xdesign/phantom/phantom.py on lines 156..158

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

                                        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

                                        Line too long (80 > 79 characters)
                                        Open

                                                return 0.5 * np.abs(np.dot(x, np.roll(y, 1)) - np.dot(y, np.roll(x, 1)))
                                        Severity: Minor
                                        Found in src/xdesign/geometry/area.py by pep8

                                        Limit all lines to a maximum of 79 characters.

                                        There are still many devices around that are limited to 80 character
                                        lines; plus, limiting windows to 80 characters makes it possible to
                                        have several windows side-by-side.  The default wrapping on such
                                        devices looks ugly.  Therefore, please limit all lines to a maximum
                                        of 79 characters. For flowing long blocks of text (docstrings or
                                        comments), limiting the length to 72 characters is recommended.
                                        
                                        Reports error E501.

                                        Invalid escape sequence '\p'
                                        Open

                                            :math:`2\pi /` ``order`` gives a result equivalent to no rotation.
                                        Severity: Minor
                                        Found in src/xdesign/geometry/area.py by pep8

                                        Invalid escape sequences are deprecated in Python 3.6.

                                        Okay: regex = r'\.png$'
                                        W605: regex = '\.png$'

                                        Line too long (80 > 79 characters)
                                        Open

                                                    p0 = Point(obj['vertices'][face[0], 0], obj['vertices'][face[0], 1])
                                        Severity: Minor
                                        Found in src/xdesign/geometry/area.py by pep8

                                        Limit all lines to a maximum of 79 characters.

                                        There are still many devices around that are limited to 80 character
                                        lines; plus, limiting windows to 80 characters makes it possible to
                                        have several windows side-by-side.  The default wrapping on such
                                        devices looks ugly.  Therefore, please limit all lines to a maximum
                                        of 79 characters. For flowing long blocks of text (docstrings or
                                        comments), limiting the length to 72 characters is recommended.
                                        
                                        Reports error E501.

                                        Line too long (80 > 79 characters)
                                        Open

                                                    p2 = Point(obj['vertices'][face[2], 0], obj['vertices'][face[2], 1])
                                        Severity: Minor
                                        Found in src/xdesign/geometry/area.py by pep8

                                        Limit all lines to a maximum of 79 characters.

                                        There are still many devices around that are limited to 80 character
                                        lines; plus, limiting windows to 80 characters makes it possible to
                                        have several windows side-by-side.  The default wrapping on such
                                        devices looks ugly.  Therefore, please limit all lines to a maximum
                                        of 79 characters. For flowing long blocks of text (docstrings or
                                        comments), limiting the length to 72 characters is recommended.
                                        
                                        Reports error E501.

                                        Invalid escape sequence '\p'
                                        Open

                                            only meaningful modulo :math:`2\pi /` ``order`` since rotation by
                                        Severity: Minor
                                        Found in src/xdesign/geometry/area.py by pep8

                                        Invalid escape sequences are deprecated in Python 3.6.

                                        Okay: regex = r'\.png$'
                                        W605: regex = '\.png$'

                                        Line too long (80 > 79 characters)
                                        Open

                                                    p1 = Point(obj['vertices'][face[1], 0], obj['vertices'][face[1], 1])
                                        Severity: Minor
                                        Found in src/xdesign/geometry/area.py by pep8

                                        Limit all lines to a maximum of 79 characters.

                                        There are still many devices around that are limited to 80 character
                                        lines; plus, limiting windows to 80 characters makes it possible to
                                        have several windows side-by-side.  The default wrapping on such
                                        devices looks ugly.  Therefore, please limit all lines to a maximum
                                        of 79 characters. For flowing long blocks of text (docstrings or
                                        comments), limiting the length to 72 characters is recommended.
                                        
                                        Reports error E501.

                                        There are no issues that match your filters.

                                        Category
                                        Status