matteoferla/Fragmenstein

View on GitHub

Showing 254 of 254 total issues

Avoid too many return statements within this function.
Open

            return False
Severity: Major
Found in fragmenstein/monster/_communal.py - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                return False
    Severity: Major
    Found in fragmenstein/monster/mcs_mapping/compare_atom.py - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                  return False
      Severity: Major
      Found in fragmenstein/monster/mcs_mapping/compare_atom.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                    return False  # too bonded already!
        Severity: Major
        Found in fragmenstein/monster/_communal.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                                  return False  # if the warhead is not connected pretend it is not a warhead.
          Severity: Major
          Found in fragmenstein/monster/_communal.py - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                    return MinizationOutcome(success=success,
            Severity: Major
            Found in fragmenstein/monster/_ff.py - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                          return False
              Severity: Major
              Found in fragmenstein/monster/mcs_mapping/compare_atom.py - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                            return False
                Severity: Major
                Found in fragmenstein/monster/mcs_mapping/compare_atom.py - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                          return {name: flip_mapping(submapping) for name, submapping in mapping.items()}
                  Severity: Major
                  Found in fragmenstein/monster/mcs_mapping/utils.py - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                return False
                    Severity: Major
                    Found in fragmenstein/monster/mcs_mapping/compare_atom.py - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                  return cls.from_hit_codes(hit_codes=row.fragments.split(','),
                      Severity: Major
                      Found in fragmenstein/mpro/__init__.py - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                    return 'too moved'
                        Severity: Major
                        Found in fragmenstein/laboratory/_base.py - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                  return 100 - int(single_origin[sorted_names[0]] / sum(single_origin.values()) * 100)
                          Severity: Major
                          Found in fragmenstein/laboratory/_base.py - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                    return trial == 1 or atom.GetProp('provenance') == 'common'
                            Severity: Major
                            Found in fragmenstein/faux_victors/mcs_monster.py - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                          return 'equally sized'
                              Severity: Major
                              Found in fragmenstein/laboratory/_base.py - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                            return 'too contorted'
                                Severity: Major
                                Found in fragmenstein/laboratory/_base.py - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                              return None
                                  Severity: Major
                                  Found in fragmenstein/m_rmsd.py - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                                return 'acceptable'
                                    Severity: Major
                                    Found in fragmenstein/laboratory/_base.py - About 30 mins to fix

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

                                          def inventorize_warheads(cls, hits: List[Chem.Mol], covalent_form: bool = True) -> List[str]:
                                              """
                                              Get the warhead types of the list of hits
                                      
                                              :param hits:
                                      Severity: Minor
                                      Found in fragmenstein/victor/_victor_common.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 _parse_key_residues has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                          def _parse_key_residues(self,
                                                                  key_residues: Union[None, Sequence[Union[int, str, Tuple[int, str]]],
                                                                                      pyrosetta.Vector1]):
                                              """
                                              Parse a list of residues into a list of pose residue indices that will be filling ``self.key_residues``.
                                      Severity: Minor
                                      Found in fragmenstein/igor/_igor_init.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