dmyersturnbull/mandos

View on GitHub

Showing 151 of 151 total issues

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

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

    Function _to_hits has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

    def _to_hits(self: AbsDf) -> Sequence[AbstractHit]:
        hits = []
        for row in self.itertuples():
            # noinspection PyUnresolvedReferences
            c = row.hit_class
    Severity: Minor
    Found in mandos/model/hit_dfs.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 calc_psi has 10 arguments (exceeds 4 allowed). Consider refactoring.
    Open

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

      Function document has 10 arguments (exceeds 4 allowed). Consider refactoring.
      Open

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

        Function run has 10 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 10 arguments (exceeds 4 allowed). Consider refactoring.
          Open

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

            Function _traverse has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
            Open

                def _traverse(
                    cls, source: TargetNode, permitting: Set[TargetEdgeReqs], results: Set[TargetNode]
                ) -> None:
                    # recursive method called from traverse
                    # this got really complex
            Severity: Minor
            Found in mandos/model/apis/chembl_support/chembl_target_graphs.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 run has 10 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 10 arguments (exceeds 4 allowed). Consider refactoring.
              Open

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

                Function calc_enrichment has 10 arguments (exceeds 4 allowed). Consider refactoring.
                Open

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

                  Function split_and_flatten_nonnulls has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def split_and_flatten_nonnulls(
                          cls, sep: str, skip_nulls: bool = False
                      ) -> Callable[[Iterable[Union[str, int, float, None]]], Set[str]]:
                          def split_flat(things: Iterable[str]) -> Set[str]:
                              results = set()
                  Severity: Minor
                  Found in mandos/model/apis/pubchem_support/_nav_fns.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 resolve has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def resolve(cls, types: str) -> Set[TargetType]:
                          """
                          Resolve a bunch of target types in a comma-separated list.
                          Allows for special types prefixed by an ``@``: ``@all``, ``@known``, ``@protein``, ``@molecular``,
                          and ``@nonmolecular``.
                  Severity: Minor
                  Found in mandos/model/apis/chembl_support/chembl_targets.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 run has 10 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 10 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 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
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language