Showing 9,400 of 17,590 total issues
Consider simplifying this complex logical expression. Open
Open
if ((clear_pillar and clear_grains) or
(clear_pillar and not minion_grains) or
(clear_grains and not minion_pillar)):
# Not saving pillar or grains, so just delete the cache file
self.cache.flush(bank, 'data')
Consider simplifying this complex logical expression. Open
Open
if (windows_installer or
(uninstall_string and
re.search(r'MsiExec.exe\s|MsiExec\s', uninstall_string, flags=re.IGNORECASE + re.UNICODE))):
version_data.update({'win_installer_type': 'winmsi'})
elif (re.match(r'InstallShield_', key_software, re.IGNORECASE) is not None or
Consider simplifying this complex logical expression. Open
Open
if the_localname == 'textBox' \
or the_localname == 'comboBox':
label_items = result.xpath('.//*[local-name() = "label"]')
for label_item in label_items:
if label_item.text:
Consider simplifying this complex logical expression. Open
Open
if etree.QName(child_item).localname == 'boolean' \
and (TRUE_LIST_XPATH(child_item) or FALSE_LIST_XPATH(child_item)):
# WARNING: no OOB adm files use true/falseList items
# this has not been fully vetted
temp_dict = {'trueList': TRUE_LIST_XPATH, 'falseList': FALSE_LIST_XPATH}
Consider simplifying this complex logical expression. Open
Open
if isinstance(cur_cmp, dict) and isinstance(cur_struct, dict):
log.debug('Comparing dict to dict')
for cmp_key, cmp_value in six.iteritems(cur_cmp):
if cmp_key == '*':
# matches any key from the source dictionary
Function route53_alias_present
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def route53_alias_present(name, region=None, key=None, keyid=None, profile=None, **kwargs):
'''
Ensure a Route53 Alias exists and is pointing at the given CloudFront
distribution. An ``A`` record is always created, and if IPV6 is enabled on
the given distribution, an ``AAAA`` record will be created as well. Also be
Function present
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def present(name, listeners, availability_zones=None, subnets=None,
subnet_names=None, security_groups=None, scheme='internet-facing',
health_check=None, attributes=None,
attributes_from_pillar="boto_elb_attributes", cnames=None,
alarms=None, alarms_from_pillar="boto_elb_alarms", policies=None,
Function _mixin_setup
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def _mixin_setup(self):
actions_group = optparse.OptionGroup(self, 'Actions')
actions_group.set_conflict_handler('resolve')
actions_group.add_option(
'-l', '--list',
Function sig4
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def sig4(method, endpoint, params, prov_dict,
aws_api_version=DEFAULT_AWS_API_VERSION, location=None,
product='ec2', uri='/', requesturl=None, data='', headers=None,
role_arn=None, payload_hash=None):
'''
Function __init__
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def __init__(self,
args=None,
executable=None,
shell=False,
cwd=None,
Function __init__
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def __init__(self,
module_dirs,
opts=None,
tag='module',
loaded_base_name=None,
Function create_node
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def create_node(vm_):
'''
Build and submit the XML to create a node
'''
# Start the tree
Function post_master_init
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def post_master_init(self, master):
log.debug("subclassed LazyLoaded _post_master_init")
if self.connected:
self.opts['master'] = master
Function attr
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
attr: function( elem, name, value ) {
var hooks, notxml, ret,
nType = elem.nodeType;
// don't get/set attributes on text, comment and attribute nodes
Function setOffset
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setOffset: function( elem, options, i ) {
var position = jQuery.css( elem, "position" );
// set position first, in-case top/left are set even on static elem
if ( position === "static" ) {
Function fixCloneNodeIssues
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function fixCloneNodeIssues( src, dest ) {
var nodeName, e, data;
// We do not need to do anything for non-Elements
if ( dest.nodeType !== 1 ) {
Function load
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jQuery.fn.load = function( url, params, callback ) {
if ( typeof url !== "string" && _load ) {
return _load.apply( this, arguments );
}
Function managed
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def managed(name,
data,
**kwargs):
'''
Manage the device configuration given the input data structured
Function jdbc_datasource_present
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def jdbc_datasource_present(name,
description='',
enabled=True,
restype='datasource',
vendor='mysql',
Function parse_auth
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def parse_auth(rule):
'''
Parses the auth/authconfig line
'''
parser = argparse.ArgumentParser()