matteoferla/Fragmenstein

View on GitHub

Showing 254 of 254 total issues

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

    def judge_n_move_on(self, combined, combined_map, other, possible_map, others, disregarded):
Severity: Minor
Found in fragmenstein/monster/unmerge_mapper.py - About 45 mins to fix

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

    def _add_mol(self, mol, name=None, carbon_color: Optional[str] = None, opacity=1., **kwargs):
    Severity: Minor
    Found in fragmenstein/mol3d_display.py - About 45 mins to fix

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

          def __call__(self,
                       parameters: rdFMCS.MCSAtomCompareParameters,
                       hit: Chem.Mol,
                       hit_atom_idx: int,
                       followup: Chem.Mol,
      Severity: Minor
      Found in fragmenstein/monster/mcs_mapping/compare_atom.py - About 45 mins to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

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

          def _pre_fragment_pairs(self, scaffold: Chem.Mol, fragmentanda: Chem.Mol, A2B_mapping: Optional = None) \
                  -> Dict[int, List[Dict]]:
              """
              Returns
      
      
      Severity: Minor
      Found in fragmenstein/monster/_merge.py - About 45 mins to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

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

          def place(self,
      Severity: Minor
      Found in fragmenstein/monster/_place.py - About 45 mins to fix

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

            def _perform_unmerge(self,
                                 maps: Dict[str, List[Dict[int, int]]],
                                 n_poisonous:int,
                                 primary_name:Optional[str]=None) -> Unmerge:
                """
        Severity: Minor
        Found in fragmenstein/monster/_place_modes/_no_blending.py - About 45 mins to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

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

            def convert_to_sdf(self,
        Severity: Minor
        Found in fragmenstein/laboratory/_extras.py - About 45 mins to fix

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

              def _place_ops(cls, analogs, pdbblock, n_cores, timeout, suffix, **settings) -> pd.DataFrame:
          Severity: Minor
          Found in fragmenstein/laboratory/_extras.py - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                    if rex is not None:
                                        h = int(rex.group(1))
                                        mapping.append((i, h))
                        mappings.append(mapping)
            Severity: Major
            Found in fragmenstein/m_rmsd.py - About 45 mins to fix

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

              def skip(app, what, name, obj, would_skip, options):
              Severity: Minor
              Found in .readthedocs/source/conf.py - About 45 mins to fix

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

                    def _(self,
                Severity: Minor
                Found in fragmenstein/victor/_victor_place.py - About 45 mins to fix

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

                      def place(self,
                  Severity: Minor
                  Found in fragmenstein/victor/_victor_place.py - About 45 mins to fix

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

                        def combine_subprocess(self, binary_hits: List[bytes]) -> dict:
                            """
                            This is the combination subprocess. The placement subprocess is ``place_subprocess``.
                            They are very similar...
                            """
                    Severity: Minor
                    Found in fragmenstein/laboratory/_combine.py - About 45 mins to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Avoid deeply nested control flow statements.
                    Open

                                            if first is None:
                                                first = warhead_name
                                                new_hits.append(hit)
                                            elif warhead_name == first:
                                                new_hits.append(hit)
                    Severity: Major
                    Found in fragmenstein/victor/_victor_common.py - About 45 mins to fix

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

                          def _prepare_args_for_placement(self,
                      Severity: Minor
                      Found in fragmenstein/victor/_victor_place.py - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                if xyz:
                                                    cls._set_xyz(tatom, xyz)
                                        options.append(option)
                        Severity: Major
                        Found in fragmenstein/m_rmsd.py - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                  if resType in self.water_resnames:
                                                      continue
                                          self.step = 1
                          Severity: Major
                          Found in fragmenstein/victor/minimalPDB.py - About 45 mins to fix

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

                                def extract_mols(cls,
                            Severity: Minor
                            Found in fragmenstein/victor/_victor_utils.py - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                      if resType not in self.to_preserve_heteroResname:
                                                          continue
                                                  if self.remove_water:
                              Severity: Major
                              Found in fragmenstein/victor/minimalPDB.py - About 45 mins to fix

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

                                def hits_check(mols_col: pd.Series) -> bool:
                                    for mols in mols_col:
                                        if not isinstance(mols, list):
                                            return False
                                        for mol in mols:
                                Severity: Minor
                                Found in fragmenstein/laboratory/validator.py - About 45 mins to fix

                                Cognitive Complexity

                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                A method's cognitive complexity is based on a few simple rules:

                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                • Code is considered more complex for each "break in the linear flow of the code"
                                • Code is considered more complex when "flow breaking structures are nested"

                                Further reading

                                Severity
                                Category
                                Status
                                Source
                                Language