tadashi-aikawa/jumeaux

View on GitHub
jumeaux/executor.py

Summary

Maintainability
D
2 days
Test Coverage

File executor.py has 769 lines of code (exceeds 250 allowed). Consider refactoring.
Open

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import hashlib
import io
Severity: Major
Found in jumeaux/executor.py - About 1 day to fix

    Function challenge has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
    Open

    def challenge(arg_dict: dict) -> dict:
        """
        [[[ WARNING !!!!! ]]]
        `arg_dict` is dict like `ChallengeArg` because HttpMethod(OwlEnum) can't be pickled.
        Return value is dict like `Trial` because Status(OwlEnum) can't be pickled.
    Severity: Minor
    Found in jumeaux/executor.py - About 2 hrs 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 challenge has 57 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    def challenge(arg_dict: dict) -> dict:
        """
        [[[ WARNING !!!!! ]]]
        `arg_dict` is dict like `ChallengeArg` because HttpMethod(OwlEnum) can't be pickled.
        Return value is dict like `Trial` because Status(OwlEnum) can't be pickled.
    Severity: Major
    Found in jumeaux/executor.py - About 2 hrs to fix

      Function concurrent_request has 13 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def concurrent_request(
      Severity: Major
      Found in jumeaux/executor.py - About 1 hr to fix

        Function judgement has 11 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def judgement(
        Severity: Major
        Found in jumeaux/executor.py - About 1 hr to fix

          Function store_criterion has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def store_criterion(
          Severity: Minor
          Found in jumeaux/executor.py - About 35 mins to fix

            Function __run has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            def __run(
            Severity: Minor
            Found in jumeaux/executor.py - About 35 mins to fix

              There are no issues that match your filters.

              Category
              Status