Showing 38 of 50 total issues
Function QuickAddCtrl
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
function QuickAddCtrl($scope,$modalInstance,addTaskToProject,$routeParams,$rootScope,project,$location,p){
Function AddProjCtrl
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
function AddProjCtrl(projects,deleteProject,removeProjectFromRoot,addProjectToRoot,addProject,$modal,$scope,projectPage){
Function ProjCtrl
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
function ProjCtrl(project,$location,$interpolate,sortByPriority,completeTask,$window,$q,$rootScope){
Function get
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def get(self,item_id):
proj = Project.get_by_id(item_id)
if proj is not None:
result = proj.to_json(add_tasks=True)
tasks = proj.tasks.all()
- 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 _add_test
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def _add_test(self,data_func,model,expected_response,excludes=None,content_type=None,*args,**kwargs):
Avoid deeply nested control flow statements. Open
if not updated:
updated = True
result = jsonify(success=True,error=None)
send_msg('update:task',task.save().to_json())
Function post
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def post(self):
self._process_post()
proj = Project.query.get(self.data['item_id'])
success = None
if proj:
- 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 get_app
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def get_app(settings=None,extensions=None,add_default_extensions=True,*args,**kwargs):
reset_db = None
if 'reset_db' in kwargs:
reset_db = kwargs.pop('reset_db')
app = Flask(__name__,*args,**kwargs)
- 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 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 _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 _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"
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 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 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_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"