justaddcoffee/kg-emerging-viruses

View on GitHub

Showing 237 of 237 total issues

Avoid too many return statements within this function.
Open

    return _.values(iterable);
Severity: Major
Found in docs/_static/underscore-1.3.1.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                        return results;
    Severity: Major
    Found in docs/_static/jquery-3.5.1.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

              return false;
      Severity: Major
      Found in docs/_static/jquery-3.5.1.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

            if (className != toString.call(b)) return false;
        Severity: Major
        Found in docs/_static/underscore-1.3.1.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                      return elem.disabled === disabled;
          Severity: Major
          Found in docs/_static/jquery-3.5.1.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                return data;
            Severity: Major
            Found in docs/_static/jquery-3.5.1.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                  if (typeof a != 'object' || typeof b != 'object') return false;
              Severity: Major
              Found in docs/_static/underscore-1.3.1.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                      if ('constructor' in a != 'constructor' in b || a.constructor != b.constructor) return false;
                Severity: Major
                Found in docs/_static/underscore-1.3.1.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                      return result;
                  Severity: Major
                  Found in docs/_static/underscore-1.3.1.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                          if (stack[length] == a) return true;
                    Severity: Major
                    Found in docs/_static/underscore-1.3.1.js - About 30 mins to fix

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

                          def parse_chembl_document(self, data: List):
                              """Parse ChEMBL Document records.
                      
                              Args:
                                  data: A list of ChEMBL Document records
                      Severity: Minor
                      Found in kg_covid_19/transform_utils/chembl/chembl_transform.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 run has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def run(self, data_file: Optional[str] = None):
                              """Run the transform."""
                              # file housekeeping
                              os.makedirs(self.output_dir, exist_ok=True)
                      
                      

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

                          def parse_annotations(
                              self,
                              node_handle: IO,
                              edge_handle: IO,
                              data_file1: str,
                      Severity: Minor
                      Found in kg_covid_19/transform_utils/scibite_cord/scibite_cord.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 extract_termite_hits has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def extract_termite_hits(self, data: Dict) -> Set:
                              """Parse termite hits.
                      
                              Args:
                                  node_handle: File handle for nodes.csv.
                      Severity: Minor
                      Found in kg_covid_19/transform_utils/scibite_cord/scibite_cord.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 normalize_curies has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                      def normalize_curies(map_path: str, entries: List) -> List:
                          """
                          Normalize CURIEs baded on a map file.
                      
                          Given a SSSOM map file defining one or more
                      Severity: Minor
                      Found in kg_covid_19/utils/normalize_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 multi_page_table_to_list has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                      def multi_page_table_to_list(multi_page_table: Any) -> List[Dict]:
                          """
                          Convert multi-page tables to lists of dicts.
                      
                          Method to turn table data returned from tabula.io.read_pdf(),
                      Severity: Minor
                      Found in kg_covid_19/utils/transform_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 load_gene_info has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def load_gene_info(
                              self, input_dir: str, output_dir: str, species_id: Optional[List] = None
                          ) -> None:
                              """Load mappings from NCBI gene_info (gene_info.gz).
                      
                      
                      Severity: Minor
                      Found in kg_covid_19/transform_utils/scibite_cord/scibite_cord.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