dmyersturnbull/mandos

View on GitHub

Showing 151 of 151 total issues

Function run has 9 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def run(
Severity: Major
Found in mandos/entry/entry_commands.py - About 1 hr to fix

    Function run has 9 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def run(
    Severity: Major
    Found in mandos/entry/entry_commands.py - About 1 hr to fix

      Function run has 9 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def run(
      Severity: Major
      Found in mandos/entry/entry_commands.py - About 1 hr to fix

        Function run has 9 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def run(
        Severity: Major
        Found in mandos/entry/entry_commands.py - About 1 hr to fix

          Function run has 9 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def run(
          Severity: Major
          Found in mandos/entry/entry_commands.py - About 1 hr to fix

            Function _create_hit has 9 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def _create_hit(
            Severity: Major
            Found in mandos/model/searches.py - About 1 hr to fix

              Function run has 9 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def run(
              Severity: Major
              Found in mandos/entry/entry_commands.py - About 1 hr to fix

                Function run has 9 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def run(
                Severity: Major
                Found in mandos/entry/entry_commands.py - About 1 hr to fix

                  Function run has 9 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def run(
                  Severity: Major
                  Found in mandos/entry/entry_commands.py - About 1 hr to fix

                    Function run has 9 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def run(
                    Severity: Major
                    Found in mandos/entry/entry_commands.py - About 1 hr to fix

                      Function __init__ has 9 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def __init__(
                      Severity: Major
                      Found in mandos/search/chembl/_activity_search.py - About 1 hr to fix

                        Function download has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                        Open

                            def download(self, force: bool = False) -> None:
                                if self.ligands is None or self.interactions is None or force:
                                    # always download both together -- we don't want them non-synced
                                    exists = self.ligands_path.exists() and self.interactions_path.exists()
                                    if exists and not force:
                        Severity: Minor
                        Found in mandos/model/apis/g2p_api.py - About 1 hr 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 main has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                        Open

                            def main(self) -> None:
                                try:
                                    self._mandos = MandosCli.as_cli()
                                    self._mandos.cli()
                                    _err("Done! Exited successfully.")
                        Severity: Minor
                        Found in mandos/cli.py - About 1 hr 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 find has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                        Open

                            def find(self, inchikey: str) -> Sequence[TrialHit]:
                                data = self.api.fetch_data(inchikey)
                                hits = []
                                # {std_status}:phase{std_phase}
                                for dd in data.drug_and_medication_information.clinical_trials:
                        Severity: Minor
                        Found in mandos/search/pubchem/trials_search.py - About 1 hr 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 _strip_by_key_in_place has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                        Open

                            def _strip_by_key_in_place(self, data: Union[dict, list], bad_key: str) -> None:
                                if isinstance(data, list):
                                    for x in data:
                                        self._strip_by_key_in_place(x, bad_key)
                                elif isinstance(data, dict):
                        Severity: Minor
                        Found in mandos/model/apis/querying_pubchem_api.py - About 1 hr 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_value_and_unit has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                        Open

                            def _extract_value_and_unit(
                                self, dot: NestedDotDict
                            ) -> Tup[Union[None, int, str, float, bool], str]:
                                value, unit = None, None
                                if "Number" in dot and len(["Number"]) == 1:
                        Severity: Minor
                        Found in mandos/model/apis/pubchem_support/pubchem_data.py - About 1 hr 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 export_db has 8 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            def export_db(
                        Severity: Major
                        Found in mandos/entry/misc_commands.py - About 1 hr to fix

                          Consider simplifying this complex logical expression.
                          Open

                                  if path is not None and url is None and query is None:
                                      return cls.from_path(path)
                                  elif path is None and url is not None and query is not None:
                                      return cls.from_query(url, query, query_args)
                                  elif path is not None and url is not None and query is not None:
                          Severity: Major
                          Found in mandos/model/utils/sources.py - About 1 hr to fix

                            Function _run has 8 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                def _run(
                            Severity: Major
                            Found in mandos/entry/abstract_entries.py - About 1 hr to fix

                              Function plot_projection has 8 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  def plot_projection(
                              Severity: Major
                              Found in mandos/entry/plot_commands.py - About 1 hr to fix
                                Severity
                                Category
                                Status
                                Source
                                Language