Showing 9,400 of 17,590 total issues
Function get_printout
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
def get_printout(out, opts=None, **kwargs):
'''
Return a printer function
'''
if opts is None:
- 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 defaultPrefilter
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
function defaultPrefilter( elem, props, opts ) {
/*jshint validthis:true */
var prop, index, length,
value, dataShow, toggle,
tween, hooks, oldfire,
File ciscoconfparse_mod.py
has 328 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
Execution module for `ciscoconfparse <http://www.pennington.net/py/ciscoconfparse/index.html>`_
.. versionadded:: 2019.2.0
File win_dism.py
has 327 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
Installing of Windows features using DISM
=========================================
File sql_base.py
has 327 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
Retrieve Pillar data by doing a SQL query
This module is not meant to be used directly as an ext_pillar.
LocalClient
has 31 functions (exceeds 20 allowed). Consider refactoring. Open
class LocalClient(object):
'''
The interface used by the :command:`salt` CLI tool on the Salt Master
``LocalClient`` is used to send a command to Salt minions to execute
SaltEvent
has 31 functions (exceeds 20 allowed). Consider refactoring. Open
class SaltEvent(object):
'''
Warning! Use the get_event function or the code will not be
RAET compatible
The base class used to manage salt events
CkMinions
has 31 functions (exceeds 20 allowed). Consider refactoring. Open
class CkMinions(object):
'''
Used to check what minions should respond from a target
Note: This is a best-effort set of the minions that would match a target.
_BaseNetwork
has 31 functions (exceeds 20 allowed). Consider refactoring. Open
class _BaseNetwork(_IPAddressBase):
"""A generic IP network object.
This IP class contains the version independent methods which are
File dictdiffer.py
has 325 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
Calculate the difference between two dictionaries as:
(1) items added
(2) items removed
File key.py
has 325 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
Wheel system wrapper for the Salt key system to be used in interactions with
the Salt Master programmatically.
File libcloud_loadbalancer.py
has 324 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
Apache Libcloud Load Balancer Management
========================================
File proxy.py
has 324 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
This module allows you to manage proxy settings
.. code-block:: bash
File supervisord.py
has 324 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
Provide the service module for system supervisord or supervisord in a
virtualenv
'''
File win_groupadd.py
has 324 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
Manage groups on Windows
.. important::
File trafficserver.py
has 323 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
Apache Traffic Server execution module.
.. versionadded:: 2015.8.0
File rvm.py
has 323 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
Manage ruby installations and gemsets with RVM, the Ruby Version Manager.
'''
from __future__ import absolute_import, unicode_literals, print_function
Function _bind
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
def _bind(username, password, anonymous=False, opts=None):
'''
Authenticate via an LDAP bind
'''
# Get config params; create connection dictionary
- 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 check_autosign_grains
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
def check_autosign_grains(self, autosign_grains):
'''
Check for matching grains in the autosign_grains_dir.
'''
if not autosign_grains or 'autosign_grains_dir' not in self.opts:
- 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 property_present
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
def property_present(name, property, value):
'''
Ensure property has a certain value
name : string
- 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"