alliance-genome/agr

View on GitHub

Showing 75 of 182 total issues

Avoid too many return statements within this function.
Open

            return "Saccharomyces cerevisiae"
Severity: Major
Found in indexer/src/loaders/gene_loader.py - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                return "Homo sapiens"
    Severity: Major
    Found in indexer/src/loaders/gene_loader.py - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                  return None
      Severity: Major
      Found in indexer/src/loaders/gene_loader.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

              return (<WordpressNews data={this.props.data} path={this.props.params.url}  />);
        Severity: Major
        Found in webapp/src/containers/wordpress/wordpressFeeds/index.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                      return "Drosophila melanogaster"
          Severity: Major
          Found in indexer/src/loaders/gene_loader.py - About 30 mins to fix

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

              filterCallback(dat) {
                const meetMethodFilter = this.state.filterMethod ?
                  dat.predictionMethodsMatched.indexOf(this.state.filterMethod) > -1 :
                  true;
                return (
            Severity: Minor
            Found in webapp/src/components/orthology/orthologyFilteredTable.js - 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 attach_annotations has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                def attach_annotations(gene, annots, do_data):
            
                    gene_id = gene['primaryId']
                    gene_symbol = gene['symbol']
                    species = gene['species']
            Severity: Minor
            Found in indexer/src/annotators/do_annotator.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 get_complete_pub_url has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                def get_complete_pub_url(self, local_id, global_id):
            
                    complete_url = None
            
                    if 'MGI' in global_id:
            Severity: Minor
            Found in indexer/src/loaders/disease_loader.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 __init__ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                def __init__(self, mods):
                    path = "tmp"
                    S3File("mod-datadumps", "RefGenomeOrthologs.tar.gz", path).download()
                    TARFile(path, "RefGenomeOrthologs.tar.gz").extract_all()
                    self.homolog_data = CSVFile(path + "/" + "RefGenomeOrthologs").get_data()
            Severity: Minor
            Found in indexer/src/loaders/homolog_loader.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_go has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                def load_go(self):
                    path = "tmp"
                    S3File("mod-datadumps/GO/ANNOT", "gene_association.sgd.gz", path).download()
                    go_annot_dict = {}
                    with gzip.open(path + "/gene_association.sgd.gz", 'rb') as file:
            Severity: Minor
            Found in indexer/src/mods/sgd.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_go has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                def load_go(self):
                    path = "tmp"
                    S3File("mod-datadumps/GO/ANNOT", "gene_association.mgi.gz", path).download()
                    go_annot_dict = {}
                    with gzip.open(path + "/gene_association.mgi.gz", 'rb') as file:
            Severity: Minor
            Found in indexer/src/mods/mouse.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_go has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                def load_go(self):
                    path = "tmp"
                    S3File("mod-datadumps/GO/ANNOT", "gene_association.wb.gz", path).download()
                    go_annot_dict = {}
                    with gzip.open(path + "/gene_association.wb.gz", 'rb') as file:
            Severity: Minor
            Found in indexer/src/mods/worm.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_go has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                def load_go(self):
                    path = "tmp"
                    S3File("mod-datadumps/GO/ANNOT", "gene_association.fb.gz", path).download()
                    go_annot_dict = {}
                    with gzip.open(path + "/gene_association.fb.gz", 'rb') as file:
            Severity: Minor
            Found in indexer/src/mods/fly.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_go has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                def load_go(self):
                    path = "tmp"
                    S3File("mod-datadumps/GO/ANNOT", "gene_association.zfin.gz", path).download()
                    go_annot_dict = {}
                    with gzip.open(path + "/gene_association.zfin.gz", 'rb') as file:
            Severity: Minor
            Found in indexer/src/mods/zfin.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_go has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                def load_go(self):
                    path = "tmp"
                    S3File("mod-datadumps/GO/ANNOT", "gene_association.rgd.gz", path).download()
                    go_annot_dict = {}
                    with gzip.open(path + "/gene_association.rgd.gz", 'rb') as file:
            Severity: Minor
            Found in indexer/src/mods/rat.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