Showing 16 of 16 total issues
Function OverlayManager
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
var OverlayManager = (function(){
var overlays = [];
var opened = -1;
const _manager = {
- 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 Overlay
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
var Overlay = (function(){
function Overlay(options){
var overlay = document.createElement("div");
overlay.className = "overlay";
var open = 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 Overlay
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Overlay = (function(){
function Overlay(options){
var overlay = document.createElement("div");
overlay.className = "overlay";
var open = false;
Function OverlayManager
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
var OverlayManager = (function(){
var overlays = [];
var opened = -1;
const _manager = {
Function Overlay
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Overlay(options){
var overlay = document.createElement("div");
overlay.className = "overlay";
var open = false;
var events = [];
Function display_thumbnail
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
function display_thumbnail(doc) {
let overlay = new Overlay();
/*Header*/
let header1 = document.createElement("h1");
Function queryset
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def queryset(self, request, queryset):
"""
Returns the filtered queryset based on the value
provided in the query string and retrievable via
`self.value()`.
- 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 public_upload
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def public_upload(request):
"""Public form to upload missing images
:param request: current user request
:type request: django.http.request
- 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 queryset
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def queryset(self, request, queryset):
"""
Returns the filtered queryset based on the value
provided in the query string and retrievable via
`self.value()`.
- 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 make_released
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def make_released(self, request, queryset):
"""
Action to release training set objects. It sets the
corresponding boolean field to true.
- 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_queryset
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def get_queryset(self):
"""
Defining custom queryset
:param self: A handle to the :class:`DisciplineViewSet`
- 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 display_thumbnail
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function display_thumbnail(doc) {
let overlay = new Overlay();
/*Header*/
let header1 = document.createElement("h1");
- 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 linkcode_resolve
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def linkcode_resolve(domain, info):
"""
This function adds source code links to all modules (see :mod:`sphinx:sphinx.ext.linkcode`).
It links all classes and functions to their source files on GitHub including line numbers.
- 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
Avoid too many return
statements within this function. Open
return queryset
Function make_unreleased
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def make_unreleased(self, request, queryset):
"""
Action to hide discipline objects. It sets the
corresponding boolean field to 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 application
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def application(environ, start_response):
"""
This returns the WSGI callable
:param environ: The environment variables
- 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"