Showing 9,400 of 17,590 total issues
Function beacon
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def beacon(config):
'''
Emit a dict with a key "msgs" whose value is a list of messages
sent to the configured bot by one of the allowed usernames.
- 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 10 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, *attrs, **kwargs):
'''
:param attrs: are the attribute names of any format codes in `codes`
:param kwargs: may contain
- 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 output
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def output(data, **kwargs): # pylint: disable=unused-argument
'''
Print the output data in JSON
'''
try:
- 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 propFilter
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function propFilter( props, specialEasing ) {
var value, name, index, easing, hooks;
// camelCase, specialEasing and expand cssHook pass
for ( index in props ) {
Function setup
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
setup: function() {
if ( rformElems.test( this.nodeName ) ) {
// IE doesn't fire change on a check/radio until blur; trigger it on click
// after a propertychange. Eat the blur-change in special.change.handle.
Function security_rule_exists
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def security_rule_exists(name,
rulename=None,
vsys='1',
action=None,
disabled=None,
Function run
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run(self):
'''
Main loop of the ConCache, starts updates in intervals and
answers requests from the MWorkers
'''
Function parse_network
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def parse_network(rule):
'''
Parse the network line
'''
parser = argparse.ArgumentParser()
Function index
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def index(command,
platform=None,
platform_grain_name=None,
platform_column_name=None,
output=None,
Function remove
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def remove(name=None,
pkgs=None,
jail=None,
chroot=None,
root=None,
Function sync_all
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def sync_all(saltenv='base', extmod_whitelist=None, extmod_blacklist=None):
'''
Sync all custom types
saltenv : base
Function offset
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
jQuery.fn.offset = function( options ) {
if ( arguments.length ) {
return options === undefined ?
this :
this.each(function( i ) {
Function bind
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Function.prototype.bind = function bind(that) {
var target = this;
if (typeof target != "function") {
Function isEventSupported
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
isEventSupported = (function() {
var TAGNAMES = {
'select': 'input', 'change': 'input',
'submit': 'form', 'reset': 'form',
Function keydown
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
, keydown: function (e) {
var $this
, $items
, $active
, $parent
Function off
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
off: function( types, selector, fn ) {
var handleObj, type;
if ( types && types.preventDefault && types.handleObj ) {
// ( event ) dispatched jQuery.Event
handleObj = types.handleObj;
Function managed
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def managed(name, users=None, defaults=None):
'''
Manages the configuration of the users on the device, as specified in the state SLS file. Users not defined in that
file will be remove whilst users not configured on the device, will be added.
Function __init__
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def __init__(
self,
opts,
argv,
id_,
Function create_ca_signed_cert
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def create_ca_signed_cert(ca_name,
CN,
days=365,
cacert_path=None,
ca_filename=None,
Function upgrade
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def upgrade(*names, **kwargs):
'''
Upgrade named or all packages (run a ``pkg upgrade``). If <package name> is
omitted, the operation is executed on all packages.