Showing 224 of 1,036 total issues
Function add_node
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def add_node(self, node):
"""Add newcomers one by one, using linear preferential attachment."""
nodes = self.nodes()
# Start with a core of m0 fully-connected agents...
- 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 draft_study
has 14 arguments (exceeds 4 allowed). Consider refactoring. Open
def draft_study(
- Create a ticketCreate a ticket
Function create_hit
has 13 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_hit(
- Create a ticketCreate a ticket
Function regenerateDisplay
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
function regenerateDisplay (state) {
// Display parameters
width = 600;
height = 400;
numDots = 80;
- Create a ticketCreate a ticket
Function deploy_heroku_docker
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def deploy_heroku_docker(log, verbose=True, app=None, exp_config=None):
from dallinger.docker.tools import build_image
config = get_config()
config.load()
- 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 pull_table
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def pull_table(
self,
table: Union[Table, str],
polymorphic_identity: Optional[str] = None,
network_roles: Optional[List] = None,
- 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 prepare_advertisement
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def prepare_advertisement():
session = db.session
config = _config()
mode = config.get("mode")
- 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 _setupGame
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Memory.prototype._setupGame = function() {
var self = this;
this.gameState = 1;
this.cards = shuffle(this.options.cards);
this.card1 = "";
- Create a ticketCreate a ticket
Function _all_topics
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def _all_topics(self):
done = False
next_token = None
while not done:
if next_token is not None:
- 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_hits
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def get_hits(self, hit_filter=lambda x: True):
done = False
next_token = None
while not done:
if next_token is not None:
- 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 _verify_startup
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def _verify_startup(self):
for line in self._stream():
self._record.append(line)
if self.verbose:
self.out.blather(line)
- 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_workers_with_qualification
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def get_workers_with_qualification(self, qualification_id):
"""Get workers with the given qualification."""
done = False
next_token = None
while not done:
- 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 neighbors
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def neighbors(self, type=None, direction="to", failed=None):
"""Get a node's neighbors - nodes that are directly connected to it.
Type specifies the class of neighbour and must be a subclass of
Node (default is Node).
- 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 BusyForm
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
dlgr.BusyForm = (function () {
/* Loads a spinner as a visual cue that something is happening
and disables any jQuery objects passed to freeze(). */
var defaults = {
- Create a ticketCreate a ticket
Function driver
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def driver(self):
"""Returns a Selenium WebDriver instance of the type requested in the
configuration."""
from dallinger.config import get_config
- 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 make_demo
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def make_demo(name, src, dst):
print("Making '{}' demo...".format(name))
static_files = []
for file in os.listdir(src):
- 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 nodes
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def nodes(self, type=None, failed=False, participant_id=None):
"""Get nodes in the network.
type specifies the type of Node. Failed can be "all", False
(default) or True. If a participant_id is passed only
- 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 AjaxRejection
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
dlgr.AjaxRejection = (function () {
// Capture information related to a rejected dallinger.ajax() call.
var _responseHTML = function (response) {
var parsed;
- Create a ticketCreate a ticket
Function loadParticipant
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
dlgr.loadParticipant = function(assignment_info) {
var data,
deferred = $.Deferred(),
url = '/load-participant';
- Create a ticketCreate a ticket
Function handle_error
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
def handle_error():
request_data = request.form.get("request_data")
error_feedback = request.form.get("error_feedback")
error_type = request.form.get("error_type")
error_text = request.form.get("error_text")
- Create a ticketCreate a ticket