Showing 50 of 50 total issues
Function get_app
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_app(settings=None,extensions=None,add_default_extensions=True,*args,**kwargs):
Function _add_test
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _add_test(self,data_func,model,expected_response,excludes=None,content_type=None,*args,**kwargs):
_kwargs = {}
if content_type is not None:
kwargs['content_type'] = content_type
_kwargs['content_type'] = content_type
- Read upRead up
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 to_json
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def to_json(self,in_list=True,add_urls=True):
opts = {}
if self.due_date:
opts['due_date'] = self.due_date.ctime()
if self.project_id:
- Read upRead up
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 _test_add_form
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _test_add_form(self,model,expected_response,excludes=None,**kwargs):
data = dict(**kwargs)
res = self._send_add_request(model,data=data)
if excludes:
for itm in excludes:
- Read upRead up
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 worker_int
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def worker_int(worker):
worker.log.info("worker received INT or QUIT signal")
## get traceback info
import threading, sys, traceback
- Read upRead up
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 _test_add_data
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _test_add_data(self,model,expected_response,excludes=None,**kwargs):
data = dict(**kwargs)
res = self._send_add_request(model,json.dumps(data))
if excludes:
for itm in excludes:
- Read upRead up
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 TaskCtrl
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function TaskCtrl(project,task,activeTasks,$routeParams,$route,$location,$window,$interpolate,$scope){
var self = this,
projectUrlFunc = $interpolate('/app/project/{{ pid }}'),
changeFunc = $interpolate('/app/project/{{ pid }}/{{ tid }}');
- Read upRead up
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 MainCtrl
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function MainCtrl(socket,$rootScope,$scope){
var self = this;
$scope.priority_values = {
'1':false,
'2':false,
- Read upRead up
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 post
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def post(self):
self._process_post()
success = None
try:
task = Task.query.get(self.data.get('item_id'))
- Read upRead up
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 _test_add_json
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _test_add_json(self,model,expected_response,excludes=None,**kwargs):
data = json.dumps(dict(**kwargs))
res = self._send_add_request(model,data,content_type='application/json')
if excludes:
for itm in excludes:
- Read upRead up
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"