tobspr/RenderPipeline

View on GitHub

Showing 873 of 873 total issues

Avoid deeply nested control flow statements.
Open

                        if self.peek(k) not in u'0123456789ABCDEFabcdef':
                            raise ScannerError("while scanning a double-quoted scalar", start_mark,
                                    "expected escape sequence of %d hexdecimal numbers, but found %r" %
                                        (length, self.peek(k).encode('utf-8')), self.get_mark())
                    code = int(self.prefix(length), 16)
Severity: Major
Found in rplibs/yaml/yaml_py2/scanner.py - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                            if br == u'\n':
                                self.write_line_break()
                            else:
                                self.write_line_break(br)
                        self.write_indent()
    Severity: Major
    Found in rplibs/yaml/yaml_py2/emitter.py - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                              if self.encoding:
                                  data = data.encode(self.encoding)
                              self.stream.write(data)
      Severity: Major
      Found in rplibs/yaml/yaml_py2/emitter.py - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                if self.encoding:
                                    data = data.encode(self.encoding)
                                self.stream.write(data)
        Severity: Major
        Found in rplibs/yaml/yaml_py2/emitter.py - About 45 mins to fix

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

              def __init__(self, name, index, line, column, buffer, pointer):
          Severity: Minor
          Found in rplibs/yaml/yaml_py2/error.py - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                            for b in xrange(64):
                                slice_offset_x = (b % 8) * 64
                                slice_offset_y = (b // 8) * 64
            
                                fr, fg, fb = to_linear(r), to_linear_inv(g), to_linear(b)
            Severity: Major
            Found in rpplugins/color_correction/resources/generate_film_luts.py - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                      if not isinstance(subnode, MappingNode):
                                          raise ConstructorError("while constructing a mapping",
                                                  node.start_mark,
                                                  "expected a mapping for merging, but found %s"
                                                  % subnode.id, subnode.start_mark)
              Severity: Major
              Found in rplibs/yaml/yaml_py2/constructor.py - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        if br == u'\n':
                                            self.write_line_break()
                                        else:
                                            self.write_line_break(br)
                                    if ch is not None:
                Severity: Major
                Found in rplibs/yaml/yaml_py2/emitter.py - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                          if br == u'\n':
                                              self.write_line_break()
                                          else:
                                              self.write_line_break(br)
                                      self.write_indent()
                  Severity: Major
                  Found in rplibs/yaml/yaml_py2/emitter.py - About 45 mins to fix

                    Function represent_float has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def represent_float(self, data):
                            if data != data or (data == 0.0 and data == 1.0):
                                value = u'.nan'
                            elif data == self.inf_value:
                                value = u'.inf'
                    Severity: Minor
                    Found in rplibs/yaml/yaml_py2/representer.py - About 45 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

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

                        def __init__(self, maxval=None, widgets=None, term_width=None, poll=1,
                    Severity: Minor
                    Found in rplibs/progressbar/__init__.py - About 45 mins to fix

                      Function expect_first_flow_mapping_key has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def expect_first_flow_mapping_key(self):
                              if isinstance(self.event, MappingEndEvent):
                                  self.indent = self.indents.pop()
                                  self.flow_level -= 1
                                  self.write_indicator(u'}', False)
                      Severity: Minor
                      Found in rplibs/yaml/yaml_py2/emitter.py - About 45 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

                      Avoid deeply nested control flow statements.
                      Open

                                              if self.encoding:
                                                  data = data.encode(self.encoding)
                                              self.stream.write(data)
                      Severity: Major
                      Found in rplibs/yaml/yaml_py2/emitter.py - About 45 mins to fix

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

                            def __init__(self, stream, canonical=None, indent=None, width=None,
                        Severity: Minor
                        Found in rplibs/yaml/yaml_py2/emitter.py - About 45 mins to fix

                          Function __init__ has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def __init__(self):
                                  sys.path.insert(0, "../../")
                                  load_prc_file_data("", "win-size 512 512")
                                  load_prc_file_data("", "textures-power-2 none")
                                  load_prc_file_data("", "print-pipe-types #f")
                          Severity: Minor
                          Found in toolkit/pathtracing_reference/run_renderpipeline.py - About 45 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

                          Avoid deeply nested control flow statements.
                          Open

                                                  if self.encoding:
                                                      data = data.encode(self.encoding)
                                                  self.stream.write(data)
                          Severity: Major
                          Found in rplibs/yaml/yaml_py2/emitter.py - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                    if entry.split()[1] == setting_id:
                                                        self._update_queue.remove(entry)
                                        time.sleep(0.2)
                            Severity: Major
                            Found in toolkit/plugin_configurator/main.py - About 45 mins to fix

                              Function construct_yaml_float has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def construct_yaml_float(self, node):
                                      value = str(self.construct_scalar(node))
                                      value = value.replace('_', '').lower()
                                      sign = +1
                                      if value[0] == '-':
                              Severity: Minor
                              Found in rplibs/yaml/yaml_py2/constructor.py - About 45 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

                              Function get_snippet has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def get_snippet(self, indent=4, max_length=75):
                                      if self.buffer is None:
                                          return None
                                      head = ''
                                      start = self.pointer
                              Severity: Minor
                              Found in rplibs/yaml/yaml_py2/error.py - About 45 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

                              Function make_python_instance has 6 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  def make_python_instance(self, suffix, node,
                              Severity: Minor
                              Found in rplibs/yaml/yaml_py2/constructor.py - About 45 mins to fix
                                Severity
                                Category
                                Status
                                Source
                                Language