KarrLab/datanator

View on GitHub

Showing 376 of 791 total issues

Avoid too many return statements within this function.
Open

                return (None, None, None, None, None)
Severity: Major
Found in datanator/data_source/sabio_rk.py - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                    return (None, None, None, None, None)
    Severity: Major
    Found in datanator/data_source/sabio_rk.py - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                          return ('k_cat', 25, value * float(f) if value else None, error * float(f) if error else None, 's^(-1)')
      Severity: Major
      Found in datanator/data_source/sabio_rk.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                        return ('k_cat', 25, value, error, 's^(-1)')
        Severity: Major
        Found in datanator/data_source/sabio_rk.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                      return False
          Severity: Major
          Found in datanator/util/molecule_util.py - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                    return True
            Severity: Major
            Found in datanator/util/molecule_util.py - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                          return None
              Severity: Major
              Found in datanator/util/chem_util.py - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                                    return None
                Severity: Major
                Found in datanator/util/chem_util.py - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                              return None
                  Severity: Major
                  Found in datanator/util/molecule_util.py - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                return False
                    Severity: Major
                    Found in datanator/util/molecule_util.py - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                  return False
                      Severity: Major
                      Found in datanator/util/molecule_util.py - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                    return None
                        Severity: Major
                        Found in datanator/util/chem_util.py - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                  return "%s-%s%s%s-%s" % (major, minor, flag, flagver, flagproto)
                          Severity: Major
                          Found in datanator/util/chem_util.py - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                            return None
                            Severity: Major
                            Found in datanator/util/chem_util.py - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                          return False
                              Severity: Major
                              Found in datanator/util/molecule_util.py - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                            return None
                                Severity: Major
                                Found in datanator/util/chem_util.py - About 30 mins to fix

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

                                      def replace_key_in_similar_compounds(self):
                                          query = {}
                                          projection = {'similar_compounds': 1}
                                          _, _, col = self.con_db('metabolites_meta')
                                          docs = col.find(filter=query, projection=projection)
                                  Severity: Minor
                                  Found in datanator/data_source/metabolites_meta_collection.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 fill_meta has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      def fill_meta(self):
                                          """Fill exisiting metabolites with meta information.
                                          """
                                          query = {'inchikey': {'$exists': False}}
                                          count = self.collection.count_documents(query)

                                  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 calc_inchi_formula_connectivity has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      def calc_inchi_formula_connectivity(self, structure):
                                          """ Calculate a searchable structures
                                  
                                          * InChI format
                                          * Core InChI format
                                  Severity: Minor
                                  Found in datanator/data_source/sabio_rk_nosql.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 load_content has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      def load_content(self):
                                          """ Collects and Parses all data from Pax DB website and adds to MongoDB
                                  
                                          """
                                          client, db_obj, collection = self.con_db(self.collection)
                                  Severity: Minor
                                  Found in datanator/data_source/pax_nosql.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