Showing 150 of 257 total issues

Avoid too many return statements within this function.
Open

                return 'Salesforce'
Severity: Major
Found in src/pyff/utils.py - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                    return 'Salesforce'
    Severity: Major
    Found in src/pyff/samlmd.py - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                      return 'PingFederate'
      Severity: Major
      Found in src/pyff/utils.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                    return list(res)
        Severity: Major
        Found in src/pyff/store.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                          return 'IBMTivoliFIM'
          Severity: Major
          Found in src/pyff/samlmd.py - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                return 'other'
            Severity: Major
            Found in src/pyff/utils.py - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                      return []
              Severity: Major
              Found in src/pyff/store.py - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                                return 'PingFederate'
                Severity: Major
                Found in src/pyff/samlmd.py - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                      return data
                  Severity: Major
                  Found in src/pyff/utils.py - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                            return o.name
                    Severity: Major
                    Found in src/pyff/utils.py - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                  return self._lookup("{%s}%s" % (m.group(1), str(m.group(2)).rstrip("/")))
                      Severity: Major
                      Found in src/pyff/store.py - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                        return 'IBMTivoliFIM'
                        Severity: Major
                        Found in src/pyff/utils.py - About 30 mins to fix

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

                              def parse(self, resource: Resource, content: str) -> ParserInfo:
                                  info = ParserInfo(description='XRD links', expiration_time='never expires')
                                  t = parse_xml(unicode_stream(content))
                          
                                  relt = root(t)
                          Severity: Minor
                          Found in src/pyff/parse.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 set_nodecountry has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                          Open

                          def set_nodecountry(e, country_code):
                              """Set eidas:NodeCountry on an EntityDescriptor
                          
                              :param e: The EntityDescriptor element
                              :param country_code: An ISO country code
                          Severity: Minor
                          Found in src/pyff/samlmd.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 xslt_transform has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                          Open

                          def xslt_transform(t, stylesheet, params=None):
                              if not params:
                                  params = dict()
                          
                              if not hasattr(thread_data, 'xslt'):
                          Severity: Minor
                          Found in src/pyff/utils.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 b2u has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                          Open

                          def b2u(data: Union[str, bytes, Tuple, List, Set]) -> Union[str, bytes, Tuple, List, Set]:
                              if is_text(data):
                                  return data
                              elif isinstance(data, six.binary_type):
                                  return data.decode("utf-8")
                          Severity: Minor
                          Found in src/pyff/utils.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 entity_attribute_dict has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                          Open

                          def entity_attribute_dict(entity):
                              d = {}
                          
                              def _u(an, values):
                                  d[an] = values
                          Severity: Minor
                          Found in src/pyff/samlmd.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 _modify has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def _modify(self, entity, modifier):
                                  def _m(idx, vv):
                                      getattr(idx.setdefault(vv, EntitySet()), modifier)(entity)
                          
                                  for hn in DINDEX:
                          Severity: Minor
                          Found in src/pyff/store.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 _entities has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def _entities(self):
                                  lst = set()
                                  for ref_data in self.parts.values():
                                      for ref in ref_data['items']:
                                          e = self.objects.get(ref, None)
                          Severity: Minor
                          Found in src/pyff/store.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 help has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def help(prg):
                                  hlp = "Usage: {} [options+] <pipeline file (yaml)>\n\n"
                                  for s in config.settings():
                                      if prg in s.cmdline and not s.deprecated and not s.hidden:
                                          h = " --{}".format(s.long_name)
                          Severity: Minor
                          Found in src/pyff/constants.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

                          Severity
                          Category
                          Status
                          Source
                          Language