Showing 224 of 1,036 total issues
Function deploy
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def deploy(
- Create a ticketCreate a ticket
Function __call__
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def __call__(self):
gevent.sleep(0.200)
try:
logger.info(
- Read upRead up
- Create a ticketCreate a ticket
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 networks
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def networks(self, role="all", full="all"):
"""All the networks in the experiment."""
if full not in ["all", True, False]:
raise ValueError(
"full must be boolean or all, it cannot be {}".format(full)
- Read upRead up
- Create a ticketCreate a ticket
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 build_and_push_image
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def build_and_push_image(f):
"""Decorator for click commands that depend on a pushed docker image.
Commands using this decorator can rely on the image being present in
the remote registry, and thus can use it to deploy to a remote server.
- Read upRead up
- Create a ticketCreate a ticket
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 summary
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def summary():
"""Summarize the participants' status codes."""
exp = Experiment(session)
state = {
"status": "success",
- Read upRead up
- Create a ticketCreate a ticket
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 wait_for_text
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def wait_for_text(driver, el_id, value, removed=False, timeout=10):
el = wait_for_element(driver, el_id, timeout)
if value in el.text and not removed:
return el
if removed and value not in el.text:
- Read upRead up
- Create a ticketCreate a ticket
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 listen
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def listen(self):
"""Relay messages from a redis pubsub to all subscribed clients.
This is run continuously in a separate greenlet.
"""
- Read upRead up
- Create a ticketCreate a ticket
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 clear_workers
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def clear_workers():
import subprocess
def _zap():
kills = [["pkill", "-f", "heroku"]]
- Read upRead up
- Create a ticketCreate a ticket
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 open_chatroom
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
var open_chatroom = function () {
var ws_scheme = (window.location.protocol === "https:") ? 'wss://' : 'ws://';
// Setup a websocket connection to the "chatroom", passing our worker_id and participant_id
chatroom_socket = new ReconnectingWebSocket(
ws_scheme + location.host + "/chat?channel=chatroom&worker_id=" + dallinger.identity.workerId + '&participant_id=' + dallinger.identity.participantId
- Read upRead up
- Create a ticketCreate a ticket
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 receive
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def receive(self, what=None):
"""Receive some transmissions.
Received transmissions are marked as received, then their infos are
passed to update().
- Read upRead up
- Create a ticketCreate a ticket
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_qualification_type_by_name
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def get_qualification_type_by_name(self, name):
"""Return a Qualification Type by name. If the provided name matches
more than one Qualification, check to see if any of the results
match the provided name exactly. If there's an exact match, return
that Qualification. Otherwise, raise an exception.
- Read upRead up
- Create a ticketCreate a ticket
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 register_extra_parameters
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def register_extra_parameters(self):
initialize_experiment_package(os.getcwd())
extra_parameters = None
# Import and instantiate the experiment class if available
- Read upRead up
- Create a ticketCreate a ticket
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 create_participant
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_participant(
- Create a ticketCreate a ticket
Function worker_function
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def worker_function(
- Create a ticketCreate a ticket
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, output, verbose, bot, proxy_port, exp_config, no_browsers=False):
- Create a ticketCreate a ticket
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
- Create a ticketCreate a ticket
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
- Create a ticketCreate a ticket
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
- Create a ticketCreate a ticket
Function user_config_dir
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def user_config_dir(appname=None, appauthor=None, version=None, roaming=False):
r"""Return full path to the user-specific config dir for this application.
"appname" is the name of application.
If None, just the system directory is returned.
- Read upRead up
- Create a ticketCreate a ticket
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
Avoid deeply nested control flow statements. Open
if (this.dir !== "up") {
this.newdir = "down";
createInfo("Info", JSON.stringify({"move": "down"}));
}
- Create a ticketCreate a ticket