Showing 2,094 of 2,094 total issues
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, mode="w+b", bufsize=-1, suffix="", prefix="", dir=None):
Function dumps
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def dumps(
Function html_page_context_hook
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def html_page_context_hook(app, pagename, templatename, context, doctree):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, stdin, stdout, stderr, environ, **kwargs):
Function mail_managers
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def mail_managers(
Function handle_raw_input
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def handle_raw_input(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, name, content_type, size, charset, content_type_extra=None):
Function github_linkcode_resolve
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def github_linkcode_resolve(domain, info, *, version, next_version):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function unparsed_entity_decl
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def unparsed_entity_decl(self, name, base, sysid, pubid, notation_name):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function linenumbers
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def linenumbers(value, autoescape=True):
"""Display text with line numbers."""
lines = value.split("\n")
# Find the maximum width of the line count, for use with zero padding
# string format command
- 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 select_template
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def select_template(self, template_name_list):
"""
Given a list of template names, return the first that can be loaded.
"""
if not template_name_list:
- 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_template
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def get_template(self, template_name, skip=None):
"""
Call self.get_template_sources() and return a Template object for
the first template matching template_name. If skip is provided, ignore
template origins in skip. This is used to avoid recursion during
- 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 load_from_library
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def load_from_library(library, label, names):
"""
Return a subset of tags and filters from a library.
"""
subset = Library()
- 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 init
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
init: function() {
const serverOffset = document.body.dataset.adminUtcOffset;
if (serverOffset) {
const localOffset = new Date().getTimezoneOffset() * -60;
DateTimeShortcuts.timezoneOffset = localOffset - serverOffset;
- 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 render
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def render(self, context):
csrf_token = context.get("csrf_token")
if csrf_token:
if csrf_token == "NOTPROVIDED":
return format_html("")
- 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 strptime
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
String.prototype.strptime = function(format) {
const split_format = format.split(/[.\-/]/);
const date = this.split(/[.\-/]/);
let i = 0;
let day, month, year;
- 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"