tobspr/RenderPipeline

View on GitHub
rplibs/yaml/yaml_py2/scanner.py

Summary

Maintainability
F
2 wks
Test Coverage

File scanner.py has 891 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# Scanner produces tokens of the following types:
# STREAM-START
# STREAM-END
# DIRECTIVE(name, value)
# DOCUMENT-START
Severity: Major
Found in rplibs/yaml/yaml_py2/scanner.py - About 2 days to fix

    Scanner has 71 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Scanner(object):
    
        def __init__(self):
            """Initialize the scanner."""
            # It is assumed that Scanner and Reader will have a common descendant.
    Severity: Major
    Found in rplibs/yaml/yaml_py2/scanner.py - About 1 day to fix

      Function scan_flow_scalar_non_spaces has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
      Open

          def scan_flow_scalar_non_spaces(self, double, start_mark):
              # See the specification for details.
              chunks = []
              while True:
                  length = 0
      Severity: Minor
      Found in rplibs/yaml/yaml_py2/scanner.py - About 4 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 scan_block_scalar has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
      Open

          def scan_block_scalar(self, style):
              # See the specification for details.
      
              if style == '>':
                  folded = True
      Severity: Minor
      Found in rplibs/yaml/yaml_py2/scanner.py - About 3 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 scan_plain_spaces has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
      Open

          def scan_plain_spaces(self, indent, start_mark):
              # See the specification for details.
              # The specification is really confusing about tabs in plain scalars.
              # We just forbid them completely. Do not use tabs in YAML!
              chunks = []
      Severity: Minor
      Found in rplibs/yaml/yaml_py2/scanner.py - About 3 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 scan_plain has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
      Open

          def scan_plain(self):
              # See the specification for details.
              # We add an additional restriction for the flow context:
              #   plain scalars in the flow context cannot contain ',', ':' and '?'.
              # We also keep track of the `allow_simple_key` flag here.
      Severity: Minor
      Found in rplibs/yaml/yaml_py2/scanner.py - About 2 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 fetch_more_tokens has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
      Open

          def fetch_more_tokens(self):
      
              # Eat whitespaces and comments until we reach the next token.
              self.scan_to_next_token()
      
      
      Severity: Minor
      Found in rplibs/yaml/yaml_py2/scanner.py - About 2 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 scan_block_scalar_indicators has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
      Open

          def scan_block_scalar_indicators(self, start_mark):
              # See the specification for details.
              chomping = None
              increment = None
              ch = self.peek()
      Severity: Minor
      Found in rplibs/yaml/yaml_py2/scanner.py - About 2 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 fetch_value has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
      Open

          def fetch_value(self):
      
              # Do we determine a simple key?
              if self.flow_level in self.possible_simple_keys:
      
      
      Severity: Minor
      Found in rplibs/yaml/yaml_py2/scanner.py - About 2 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 scan_to_next_token has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
      Open

          def scan_to_next_token(self):
              # We ignore spaces, line breaks and comments.
              # If we find a line break in the block context, we set the flag
              # `allow_simple_key` on.
              # The byte order mark is stripped if it's the first character in the
      Severity: Minor
      Found in rplibs/yaml/yaml_py2/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 scan_tag has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
      Open

          def scan_tag(self):
              # See the specification for details.
              start_mark = self.get_mark()
              ch = self.peek(1)
              if ch == u'<':
      Severity: Minor
      Found in rplibs/yaml/yaml_py2/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 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_py2/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

      Consider simplifying this complex logical expression.
      Open

                  if not double and ch == u'\'' and self.peek(1) == u'\'':
                      chunks.append(u'\'')
                      self.forward(2)
                  elif (double and ch == u'\'') or (not double and ch in u'\"\\'):
                      chunks.append(ch)
      Severity: Major
      Found in rplibs/yaml/yaml_py2/scanner.py - About 1 hr to fix

        Function check_token has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
        Open

            def check_token(self, *choices):
                # Check if the next token is one of the given types.
                while self.need_more_tokens():
                    self.fetch_more_tokens()
                if self.tokens:
        Severity: Minor
        Found in rplibs/yaml/yaml_py2/scanner.py - About 55 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 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

          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

            Consider simplifying this complex logical expression.
            Open

                            if ch in u'\0 \t\r\n\x85\u2028\u2029'   \
                                    or (not self.flow_level and ch == u':' and
                                            self.peek(length+1) in u'\0 \t\r\n\x85\u2028\u2029') \
                                    or (self.flow_level and ch in u',:?[]{}'):
                                break
            Severity: Major
            Found in rplibs/yaml/yaml_py2/scanner.py - About 40 mins to fix

              Function scan_flow_scalar_spaces has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                  def scan_flow_scalar_spaces(self, double, start_mark):
                      # See the specification for details.
                      chunks = []
                      length = 0
                      while self.peek(length) in u' \t':
              Severity: Minor
              Found in rplibs/yaml/yaml_py2/scanner.py - About 35 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 scan_block_scalar_indentation has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                  def scan_block_scalar_indentation(self):
                      # See the specification for details.
                      chunks = []
                      max_indent = 0
                      end_mark = self.get_mark()
              Severity: Minor
              Found in rplibs/yaml/yaml_py2/scanner.py - About 35 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 scan_uri_escapes has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                  def scan_uri_escapes(self, name, start_mark):
                      # See the specification for details.
                      bytes = []
                      mark = self.get_mark()
                      while self.peek() == u'%':
              Severity: Minor
              Found in rplibs/yaml/yaml_py2/scanner.py - About 35 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 scan_tag_handle has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                  def scan_tag_handle(self, name, start_mark):
                      # See the specification for details.
                      # For some strange reasons, the specification does not allow '_' in
                      # tag handles. I have allowed it anyway.
                      ch = self.peek()
              Severity: Minor
              Found in rplibs/yaml/yaml_py2/scanner.py - About 35 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 too many return statements within this function.
              Open

                          return self.fetch_folded()
              Severity: Major
              Found in rplibs/yaml/yaml_py2/scanner.py - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                            return self.fetch_value()
                Severity: Major
                Found in rplibs/yaml/yaml_py2/scanner.py - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                              return self.fetch_flow_mapping_start()
                  Severity: Major
                  Found in rplibs/yaml/yaml_py2/scanner.py - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                return self.fetch_key()
                    Severity: Major
                    Found in rplibs/yaml/yaml_py2/scanner.py - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                  return self.fetch_single()
                      Severity: Major
                      Found in rplibs/yaml/yaml_py2/scanner.py - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                    return self.fetch_flow_mapping_end()
                        Severity: Major
                        Found in rplibs/yaml/yaml_py2/scanner.py - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                      return self.fetch_double()
                          Severity: Major
                          Found in rplibs/yaml/yaml_py2/scanner.py - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                        return self.fetch_flow_sequence_end()
                            Severity: Major
                            Found in rplibs/yaml/yaml_py2/scanner.py - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                          return self.fetch_alias()
                              Severity: Major
                              Found in rplibs/yaml/yaml_py2/scanner.py - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                            return self.fetch_literal()
                                Severity: Major
                                Found in rplibs/yaml/yaml_py2/scanner.py - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                              return self.fetch_block_entry()
                                  Severity: Major
                                  Found in rplibs/yaml/yaml_py2/scanner.py - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                                return self.fetch_flow_entry()
                                    Severity: Major
                                    Found in rplibs/yaml/yaml_py2/scanner.py - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                                  return self.fetch_tag()
                                      Severity: Major
                                      Found in rplibs/yaml/yaml_py2/scanner.py - About 30 mins to fix

                                        Avoid too many return statements within this function.
                                        Open

                                                    return self.fetch_anchor()
                                        Severity: Major
                                        Found in rplibs/yaml/yaml_py2/scanner.py - About 30 mins to fix

                                          Avoid too many return statements within this function.
                                          Open

                                                      return self.fetch_flow_sequence_start()
                                          Severity: Major
                                          Found in rplibs/yaml/yaml_py2/scanner.py - About 30 mins to fix

                                            Avoid too many return statements within this function.
                                            Open

                                                        return self.fetch_plain()
                                            Severity: Major
                                            Found in rplibs/yaml/yaml_py2/scanner.py - About 30 mins to fix

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

                                                  def scan_anchor(self, TokenClass):
                                                      # The specification does not restrict characters for anchors and
                                                      # aliases. This may lead to problems, for instance, the document:
                                                      #   [ *alias, value ]
                                                      # can be interpteted in two ways, as
                                              Severity: Minor
                                              Found in rplibs/yaml/yaml_py2/scanner.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

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

                                                  def fetch_block_entry(self):
                                              
                                                      # Block context needs additional checks.
                                                      if not self.flow_level:
                                              
                                              
                                              Severity: Minor
                                              Found in rplibs/yaml/yaml_py2/scanner.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

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

                                                  def stale_possible_simple_keys(self):
                                                      # Remove entries that are no longer possible simple keys. According to
                                                      # the YAML specification, simple keys
                                                      # - should be limited to a single line,
                                                      # - should be no longer than 1024 characters.
                                              Severity: Minor
                                              Found in rplibs/yaml/yaml_py2/scanner.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

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

                                                  def scan_tag_uri(self, name, start_mark):
                                                      # See the specification for details.
                                                      # Note: we do not check if URI is well-formed.
                                                      chunks = []
                                                      length = 0
                                              Severity: Minor
                                              Found in rplibs/yaml/yaml_py2/scanner.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

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

                                                  def scan_directive_ignored_line(self, start_mark):
                                                      # See the specification for details.
                                                      while self.peek() == u' ':
                                                          self.forward()
                                                      if self.peek() == u'#':
                                              Severity: Major
                                              Found in rplibs/yaml/yaml_py2/scanner.py and 1 other location - About 7 hrs to fix
                                              rplibs/yaml/yaml_py2/scanner.py on lines 1099..1111

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

                                              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 scan_block_scalar_ignored_line(self, start_mark):
                                                      # See the specification for details.
                                                      while self.peek() == u' ':
                                                          self.forward()
                                                      if self.peek() == u'#':
                                              Severity: Major
                                              Found in rplibs/yaml/yaml_py2/scanner.py and 1 other location - About 7 hrs to fix
                                              rplibs/yaml/yaml_py2/scanner.py on lines 891..903

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

                                              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 self.flow_level:
                                              
                                                          # Are we allowed to start a key (not nessesary a simple)?
                                                          if not self.allow_simple_key:
                                                              raise ScannerError(None, None,
                                              Severity: Major
                                              Found in rplibs/yaml/yaml_py2/scanner.py and 1 other location - About 3 hrs to fix
                                              rplibs/yaml/yaml_py2/scanner.py on lines 488..499

                                              Duplicated Code

                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                              Tuning

                                              This issue has a mass of 62.

                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                              Refactorings

                                              Further Reading

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

                                                      if not self.flow_level:
                                              
                                                          # Are we allowed to start a new entry?
                                                          if not self.allow_simple_key:
                                                              raise ScannerError(None, None,
                                              Severity: Major
                                              Found in rplibs/yaml/yaml_py2/scanner.py and 1 other location - About 3 hrs to fix
                                              rplibs/yaml/yaml_py2/scanner.py on lines 521..532

                                              Duplicated Code

                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                              Tuning

                                              This issue has a mass of 62.

                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                              Refactorings

                                              Further Reading

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

                                                      while u'0' <= ch <= u'9' or u'A' <= ch <= u'Z' or u'a' <= ch <= u'z'    \
                                                              or ch in u'-_':
                                                          length += 1
                                                          ch = self.peek(length)
                                              Severity: Major
                                              Found in rplibs/yaml/yaml_py2/scanner.py and 2 other locations - About 2 hrs to fix
                                              rplibs/yaml/yaml_py2/scanner.py on lines 923..926
                                              rplibs/yaml/yaml_py2/scanner.py on lines 1372..1375

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

                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                              Refactorings

                                              Further Reading

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

                                                      while u'0' <= ch <= u'9' or u'A' <= ch <= u'Z' or u'a' <= ch <= u'z'    \
                                                              or ch in u'-_':
                                                          length += 1
                                                          ch = self.peek(length)
                                              Severity: Major
                                              Found in rplibs/yaml/yaml_py2/scanner.py and 2 other locations - About 2 hrs to fix
                                              rplibs/yaml/yaml_py2/scanner.py on lines 811..814
                                              rplibs/yaml/yaml_py2/scanner.py on lines 1372..1375

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

                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                              Refactorings

                                              Further Reading

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

                                                          while u'0' <= ch <= u'9' or u'A' <= ch <= u'Z' or u'a' <= ch <= u'z'    \
                                                                  or ch in u'-_':
                                                              length += 1
                                                              ch = self.peek(length)
                                              Severity: Major
                                              Found in rplibs/yaml/yaml_py2/scanner.py and 2 other locations - About 2 hrs to fix
                                              rplibs/yaml/yaml_py2/scanner.py on lines 811..814
                                              rplibs/yaml/yaml_py2/scanner.py on lines 923..926

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

                                              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 check_document_start(self):
                                              
                                                      # DOCUMENT-START:   ^ '---' (' '|'\n')
                                                      if self.column == 0:
                                                          if self.prefix(3) == u'---'  \
                                              Severity: Major
                                              Found in rplibs/yaml/yaml_py2/scanner.py and 1 other location - About 2 hrs to fix
                                              rplibs/yaml/yaml_py2/scanner.py on lines 699..705

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

                                              class SimpleKey(object):
                                                  # See below simple keys treatment.
                                              
                                                  def __init__(self, token_number, required, index, line, column, mark):
                                                      self.token_number = token_number
                                              Severity: Major
                                              Found in rplibs/yaml/yaml_py2/scanner.py and 1 other location - About 2 hrs to fix
                                              rplibs/yaml/yaml_py2/error.py on lines 6..12

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

                                                  def check_document_end(self):
                                              
                                                      # DOCUMENT-END:     ^ '...' (' '|'\n')
                                                      if self.column == 0:
                                                          if self.prefix(3) == u'...'  \
                                              Severity: Major
                                              Found in rplibs/yaml/yaml_py2/scanner.py and 1 other location - About 2 hrs to fix
                                              rplibs/yaml/yaml_py2/scanner.py on lines 691..697

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

                                                          if self.peek() != u'>':
                                                              raise ScannerError("while parsing a tag", start_mark,
                                                                      "expected '>', but found %r" % self.peek().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 833..837

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

                                              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 self.peek() != '.':
                                                          raise ScannerError("while scanning a directive", start_mark,
                                                                  "expected a digit or '.', but found %r"
                                                                  % self.peek().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 949..952

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

                                              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

                                              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

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

                                                                  if (prefix == u'---' or prefix == u'...')   \
                                                                          and self.peek(3) in u'\0 \t\r\n\x85\u2028\u2029':
                                              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 1338..1339

                                              Duplicated Code

                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                              Tuning

                                              This issue has a mass of 39.

                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                              Refactorings

                                              Further Reading

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

                                                          if (prefix == u'---' or prefix == u'...')   \
                                                                  and self.peek(3) in u'\0 \t\r\n\x85\u2028\u2029':
                                              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 1348..1349

                                              Duplicated Code

                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                              Tuning

                                              This issue has a mass of 39.

                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                              Refactorings

                                              Further Reading

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

                                                  def fetch_alias(self):
                                              
                                                      # ALIAS could be a simple key.
                                                      self.save_possible_simple_key()
                                              
                                              
                                              Severity: Minor
                                              Found in rplibs/yaml/yaml_py2/scanner.py and 1 other location - About 55 mins to fix
                                              rplibs/yaml/yaml_py2/scanner.py on lines 613..622

                                              Duplicated Code

                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                              Tuning

                                              This issue has a mass of 37.

                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                              Refactorings

                                              Further Reading

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

                                                          if line_break != u'\n':
                                                              chunks.append(line_break)
                                                          elif not breaks:
                                                              chunks.append(u' ')
                                              Severity: Minor
                                              Found in rplibs/yaml/yaml_py2/scanner.py and 1 other location - About 55 mins to fix
                                              rplibs/yaml/yaml_py2/scanner.py on lines 1249..1252

                                              Duplicated Code

                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                              Tuning

                                              This issue has a mass of 37.

                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                              Refactorings

                                              Further Reading

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

                                                  def fetch_anchor(self):
                                              
                                                      # ANCHOR could start a simple key.
                                                      self.save_possible_simple_key()
                                              
                                              
                                              Severity: Minor
                                              Found in rplibs/yaml/yaml_py2/scanner.py and 1 other location - About 55 mins to fix
                                              rplibs/yaml/yaml_py2/scanner.py on lines 602..611

                                              Duplicated Code

                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                              Tuning

                                              This issue has a mass of 37.

                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                              Refactorings

                                              Further Reading

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

                                                          if line_break != u'\n':
                                                              chunks.append(line_break)
                                                          elif not breaks:
                                                              chunks.append(u' ')
                                              Severity: Minor
                                              Found in rplibs/yaml/yaml_py2/scanner.py and 1 other location - About 55 mins to fix
                                              rplibs/yaml/yaml_py2/scanner.py on lines 1351..1354

                                              Duplicated Code

                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                              Tuning

                                              This issue has a mass of 37.

                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                              Refactorings

                                              Further Reading

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

                                                  def fetch_tag(self):
                                              
                                                      # TAG could start a simple key.
                                                      self.save_possible_simple_key()
                                              
                                              
                                              Severity: Minor
                                              Found in rplibs/yaml/yaml_py2/scanner.py and 1 other location - About 45 mins to fix
                                              rplibs/yaml/yaml_py2/scanner.py on lines 669..680

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

                                                  def fetch_plain(self):
                                              
                                                      # A plain scalar could be a simple key.
                                                      self.save_possible_simple_key()
                                              
                                              
                                              Severity: Minor
                                              Found in rplibs/yaml/yaml_py2/scanner.py and 1 other location - About 45 mins to fix
                                              rplibs/yaml/yaml_py2/scanner.py on lines 624..633

                                              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

                                                          while self.column < indent and self.peek() == u' ':
                                                              self.forward()
                                              Severity: Minor
                                              Found in rplibs/yaml/yaml_py2/scanner.py and 1 other location - About 40 mins to fix
                                              rplibs/yaml/yaml_py2/scanner.py on lines 1132..1133

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

                                              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

                                                      while self.column < indent and self.peek() == u' ':
                                                          self.forward()
                                              Severity: Minor
                                              Found in rplibs/yaml/yaml_py2/scanner.py and 1 other location - About 40 mins to fix
                                              rplibs/yaml/yaml_py2/scanner.py on lines 1137..1138

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

                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                              Refactorings

                                              Further Reading

                                              There are no issues that match your filters.

                                              Category
                                              Status