tobspr/RenderPipeline

View on GitHub

Showing 873 of 873 total issues

Function __init__ has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    def __init__(self, stream, canonical=None, indent=None, width=None,
            allow_unicode=None, line_break=None):

        # The stream should have the methods `write` and possibly `flush`.
        self.stream = stream
Severity: Minor
Found in rplibs/yaml/yaml_py2/emitter.py - About 1 hr to fix

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

        def peek_event(self):
            # Get the next event.
            if self.current_event is None:
                if self.state:
                    self.current_event = self.state()
    Severity: Major
    Found in rplibs/yaml/yaml_py2/parser.py and 1 other location - About 1 hr to fix
    rplibs/yaml/yaml_py3/parser.py on lines 107..112

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

    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 self.check_token(AliasToken):
                token = self.get_token()
                event = AliasEvent(token.value, token.start_mark, token.end_mark)
                self.state = self.states.pop()
    Severity: Major
    Found in rplibs/yaml/yaml_py2/parser.py and 1 other location - About 1 hr to fix
    rplibs/yaml/yaml_py3/parser.py on lines 274..277

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

    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 self.check_token(AliasToken):
                token = self.get_token()
                event = AliasEvent(token.value, token.start_mark, token.end_mark)
                self.state = self.states.pop()
    Severity: Major
    Found in rplibs/yaml/yaml_py3/parser.py and 1 other location - About 1 hr to fix
    rplibs/yaml/yaml_py2/parser.py on lines 274..277

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

    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

        def peek_event(self):
            # Get the next event.
            if self.current_event is None:
                if self.state:
                    self.current_event = self.state()
    Severity: Major
    Found in rplibs/yaml/yaml_py3/parser.py and 1 other location - About 1 hr to fix
    rplibs/yaml/yaml_py2/parser.py on lines 107..112

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

    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 expect_flow_mapping_simple_value(self):
            self.write_indicator(u':', False)
            self.states.append(self.expect_flow_mapping_key)
            self.expect_node(mapping=True)
    Severity: Major
    Found in rplibs/yaml/yaml_py2/emitter.py and 1 other location - About 1 hr to fix
    rplibs/yaml/yaml_py2/emitter.py on lines 410..413

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

    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

            if not length:
                raise ScannerError("while scanning an %s" % name, start_mark,
                        "expected alphabetic or numeric character, but found %r"
                        % ch.encode('utf-8'), self.get_mark())
    Severity: Major
    Found in rplibs/yaml/yaml_py2/scanner.py and 1 other location - About 1 hr to fix
    rplibs/yaml/yaml_py2/scanner.py on lines 1406..1409

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

    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 expect_block_mapping_simple_value(self):
            self.write_indicator(u':', False)
            self.states.append(self.expect_block_mapping_key)
            self.expect_node(mapping=True)
    Severity: Major
    Found in rplibs/yaml/yaml_py2/emitter.py and 1 other location - About 1 hr to fix
    rplibs/yaml/yaml_py2/emitter.py on lines 355..358

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

    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

            if not chunks:
                raise ScannerError("while parsing a %s" % name, start_mark,
                        "expected URI, but found %r" % ch.encode('utf-8'),
                        self.get_mark())
    Severity: Major
    Found in rplibs/yaml/yaml_py2/scanner.py and 1 other location - About 1 hr to fix
    rplibs/yaml/yaml_py2/scanner.py on lines 927..930

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

    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

    Function update_stats has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        def update_stats(self, task=None):
            """ Updates the stats overlay """
            clock = Globals.clock
            self.debug_lines[0].text = "{:3.0f} fps  |  {:3.1f} ms  |  {:3.1f} ms max".format(
                clock.get_average_frame_rate(),
    Severity: Minor
    Found in rpcore/gui/debugger.py - About 1 hr to fix

      Function retranslateUi has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          def retranslateUi(self, MainWindow):
              _translate = QtCore.QCoreApplication.translate
              MainWindow.setWindowTitle(_translate("MainWindow", "Render Pipeline Material Editor"))
              self.label.setText(_translate("MainWindow", "MATERIAL EDITOR"))
              self.label_9.setText(_translate("MainWindow", "RENDER PIPELINE"))
      Severity: Minor
      Found in toolkit/material_editor/ui/main_window_generated.py - About 1 hr to fix

        Function setupUi has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            def setupUi(self, Dialog):
                Dialog.setObjectName("Dialog")
                Dialog.resize(342, 197)
                Dialog.setMinimumSize(QtCore.QSize(342, 197))
                Dialog.setMaximumSize(QtCore.QSize(342, 197))
        Severity: Minor
        Found in toolkit/day_time_editor/ui/point_insert_dialog_generated.py - About 1 hr to fix

          Function __init__ has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              def __init__(self):
                  load_prc_file_data("", """
                      textures-power-2 none
                      window-type offscreen
                      win-size 100 100
          Severity: Minor
          Found in rpplugins/clouds/resources/precompute.py - About 1 hr to fix

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

                def __init__(self, image=None, parent=None, x=0, y=0, w=None, h=None,
            Severity: Major
            Found in rpcore/gui/sprite.py - About 1 hr to fix

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

                  def __init__(self, parent=None, x=0, y=0, callback=None, extra_args=None,
              Severity: Major
              Found in rpcore/gui/checkbox.py - About 1 hr to fix

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

                    def __init__(self, text="", parent=None, x=0, y=0, size=10, align="left",
                Severity: Major
                Found in rpcore/gui/text.py - About 1 hr to fix

                  Function load_setting_overrides has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def load_setting_overrides(self, override_path):
                          """ Loads an override file for the settings, which contains values to
                          override the settings with """
                          overrides = load_yaml_file(override_path)
                          if not overrides:
                  Severity: Minor
                  Found in rpcore/pluginbase/manager.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

                  Function scan_flow_scalar_breaks has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def scan_flow_scalar_breaks(self, double, start_mark):
                          # See the specification for details.
                          chunks = []
                          while True:
                              # Instead of checking indentation, we check for document
                  Severity: Minor
                  Found in rplibs/yaml/yaml_py3/scanner.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

                  Function remove_light has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def remove_light(self, light):
                          assert light is not None
                          if not light.has_slot():
                              print("ERROR: Could not detach light, light was not attached!")
                              return
                  Severity: Minor
                  Found in rpcore/pynative/internal_light_manager.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

                  Function _is_pid_running has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def _is_pid_running(self, pid):
                          """ Checks if a pid is still running """
                  
                          # Code snippet from:
                          # http://stackoverflow.com/questions/568271/how-to-check-if-there-exists-a-process-with-a-given-pid
                  Severity: Minor
                  Found in rpcore/mount_manager.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

                  Severity
                  Category
                  Status
                  Source
                  Language