tobspr/RenderPipeline

View on GitHub

Showing 873 of 873 total issues

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

    def __init__(self, font="/$$rp/data/font/Roboto-Bold.ttf", pixel_size=16, align="left",
Severity: Minor
Found in rpcore/gui/text_node.py - About 45 mins to fix

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

        def _init_showbase(self, base):
            """ Inits the the given showbase object. This is part of an alternative
            method of initializing the showbase. In case base is None, a new
            ShowBase instance will be created and initialized. Otherwise base() is
            expected to either be an uninitialized ShowBase instance, or an
    Severity: Minor
    Found in rpcore/render_pipeline.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 _load_and_parse_file has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

        def _load_and_parse_file(self, pth):
            """ Loads a .IES file from a given filename, returns an IESDataset
            which is used by the load function later on. """
            self.debug("Loading ies profile from", pth)
    
    
    Severity: Minor
    Found in rpcore/util/ies_profile_loader.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.peek(k) not in '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)), self.get_mark())
                        code = int(self.prefix(length), 16)
    Severity: Major
    Found in rplibs/yaml/yaml_py3/scanner.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 = self.construct_scalar(node)
              value = value.replace('_', '').lower()
              sign = +1
              if value[0] == '-':
      Severity: Minor
      Found in rplibs/yaml/yaml_py3/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 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 = '.nan'
              elif data == self.inf_value:
                  value = '.inf'
      Severity: Minor
      Found in rplibs/yaml/yaml_py3/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, name, index, line, column, buffer, pointer):
      Severity: Minor
      Found in rplibs/yaml/yaml_py3/error.py - About 45 mins to fix

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

            def __init__(self, token_number, required, index, line, column, mark):
        Severity: Minor
        Found in rplibs/yaml/yaml_py2/scanner.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_py3/emitter.py - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                    if br == '\n':
                                        self.write_line_break()
                                    else:
                                        self.write_line_break(br)
                                if ch is not None:
            Severity: Major
            Found in rplibs/yaml/yaml_py3/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_py3/emitter.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('}', False)
                Severity: Minor
                Found in rplibs/yaml/yaml_py3/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 br == '\n':
                                            self.write_line_break()
                                        else:
                                            self.write_line_break(br)
                                    self.write_indent()
                Severity: Major
                Found in rplibs/yaml/yaml_py3/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_py3/emitter.py - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

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

                      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_py3/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 __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def __init__(self, anchor, tag, implicit, start_mark=None, end_mark=None,
                      Severity: Minor
                      Found in rplibs/yaml/yaml_py2/events.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_py3/emitter.py - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                  if br == '\n':
                                                      self.write_line_break()
                                                  else:
                                                      self.write_line_break(br)
                                              if ch is not None:
                          Severity: Major
                          Found in rplibs/yaml/yaml_py3/emitter.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_py3/constructor.py - About 45 mins to fix
                              Severity
                              Category
                              Status
                              Source
                              Language