Showing 9,400 of 17,590 total issues
Function sign_in
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
def sign_in(self, timeout=60, safe=True, tries=1, channel=None):
'''
Send a sign in request to the master, sets the key information and
returns a dict containing the master publish interface to bind to
and the decrypted aes key for transport decryption.
- 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
File ldap.py
has 406 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
Provide authentication using simple LDAP binds
:depends: - ldap Python module
File boto_elasticache.py
has 406 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
Manage Elasticache
==================
File ldap.py
has 405 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
Manage entries in an LDAP database
==================================
File httpdomain.py
has 404 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""
sphinxcontrib.httpdomain
~~~~~~~~~~~~~~~~~~~~~~~~
The HTTP domain for documenting RESTful HTTP APIs.
File auth.py
has 404 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
# Import Python Libs
from __future__ import absolute_import, print_function, unicode_literals
import multiprocessing
File neutronng.py
has 403 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
Neutron module for interacting with OpenStack Neutron
.. versionadded:: 2018.3.0
File dpkg_lowpkg.py
has 403 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
Support for DEB packages
'''
from __future__ import absolute_import, print_function, unicode_literals
File onyx.py
has 403 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
Proxy Minion for Onyx OS Switches
.. versionadded: Neon
File win_lgpo_netsh.py
has 402 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
r'''
A salt util for modifying firewall settings.
.. versionadded:: 2018.3.4
File zabbix_host.py
has 401 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
Management of Zabbix hosts.
:codeauthor: Jiri Kotlin <jiri.kotlin@ultimum.io>
File sqlite3.py
has 401 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
Management of SQLite3 databases
===============================
File zoneadm.py
has 400 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
Module for Solaris 10's zoneadm
:maintainer: Jorge Schrauwen <sjorge@blackdot.be>
Function datasource_exists
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
def datasource_exists(name, jboss_config, datasource_properties, recreate=False, profile=None):
'''
Ensures that a datasource with given properties exist on the jboss instance.
If datasource doesn't exist, it is created, otherwise only the properties that are different will be updated.
- 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 mod_run_check
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
def mod_run_check(cmd_kwargs, onlyif, unless, creates):
'''
Execute the onlyif and unless logic.
Return a result dict if:
* onlyif failed (onlyif != 0)
- 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 _subnets_present
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
def _subnets_present(route_table_name, subnet_ids=None, subnet_names=None, tags=None, region=None, key=None, keyid=None, profile=None):
ret = {'name': route_table_name,
'result': True,
'comment': '',
'changes': {}
- 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 _task_state_prediction_bandage
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
def _task_state_prediction_bandage(state):
r'''
A bandage to format and add arguments to a task state.
This is so task states can be compared.
- 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 installed
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
def installed(name, options=None):
'''
Verify that the desired port is installed, and that it was compiled with
the desired options.
- 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 encode_dict
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
def encode_dict(data, encoding=None, errors='strict', keep=False,
preserve_dict_class=False, preserve_tuples=False):
'''
Encode all string values to bytes
'''
- 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 versions
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
def versions():
'''
Figure out what versions of .NET are installed on the system
Returns:
- 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"