Dallinger/Dallinger

View on GitHub

Showing 224 of 1,036 total issues

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

    def pull_table(
Severity: Minor
Found in dallinger/experiment.py - About 35 mins to fix

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

def debug(verbose, bot, proxy, no_browsers=False, exp_config=None):
Severity: Minor
Found in dallinger/command_line/docker.py - About 35 mins to fix

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

    def __init__(
Severity: Minor
Found in dallinger/command_line/appdirs.py - About 35 mins to fix

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

def revoke(workers, qualification, by_name, reason, sandbox):
Severity: Minor
Found in dallinger/command_line/__init__.py - About 35 mins to fix

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

    def __init__(self, app_id, output, verbose, exp_config):
Severity: Minor
Found in dallinger/deployment.py - About 35 mins to fix

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

def create_participant(worker_id, hit_id, assignment_id, mode, entry_information=None):
Severity: Minor
Found in dallinger/experiment_server/experiment_server.py - About 35 mins to fix

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

def _deploy_in_mode(mode, verbose, log, app=None, archive=None):
Severity: Minor
Found in dallinger/command_line/__init__.py - About 35 mins to fix

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

def wait_for_text(driver, el_id, value, removed=False, timeout=10):
Severity: Minor
Found in dallinger/pytest_dallinger.py - About 35 mins to fix

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

def debug(verbose, bot, proxy, no_browsers=False, exp_config=None):
Severity: Minor
Found in dallinger/command_line/__init__.py - About 35 mins to fix

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

    def receive_message(
Severity: Minor
Found in dallinger/experiment.py - About 35 mins to fix

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

def deploy_sandbox_shared_setup(
Severity: Minor
Found in dallinger/deployment.py - About 35 mins to fix

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

    def compensate_worker(self, worker_id, email, dollars, notify=True):
Severity: Minor
Found in dallinger/recruiters.py - About 35 mins to fix

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

def error_page(
Severity: Minor
Found in dallinger/experiment_server/utils.py - About 35 mins to fix

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

    def __init__(
Severity: Minor
Found in dallinger/bots.py - About 35 mins to fix

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

def compensate(recruiter, worker_id, email, dollars, sandbox):
Severity: Minor
Found in dallinger/command_line/__init__.py - About 35 mins to fix

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

    def __init__(
Severity: Minor
Found in dallinger/mturk.py - About 35 mins to fix

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

    def register(self, key, type_, synonyms=None, sensitive=False, validators=None):
Severity: Minor
Found in dallinger/config.py - About 35 mins to fix

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

def build_image(
Severity: Minor
Found in dallinger/docker/tools.py - About 35 mins to fix

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

    def receive_message(
Severity: Minor
Found in demos/dlgr/demos/chatroom_ws/experiment.py - About 35 mins to fix

Function in_realtime has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    def in_realtime(self, callback=None):
        exp_start, exp_end = self.experiment.usable_replay_range
        replay_offset = time.time()
        current = self.experiment._replay_time_index
        if current < exp_start:
Severity: Minor
Found in dallinger/experiment.py - About 35 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