Showing 40 of 40 total issues
Function bidcycle_positions_update
has 7 arguments (exceeds 5 allowed). Consider refactoring. Open
def bidcycle_positions_update(sender, instance, action, reverse, model, pk_set, **kwargs):
Avoid deeply nested control flow statements. Open
with client.options(timeout=int(get_delineated_environment_variable('SOAP_TIMEOUT', 180))): response_xml = ET.tostring(getattr(client.service, soap_function_name)(**soap_arguments), encoding="unicode") except TimeoutException as e:
Function mode_cycles
has a Cognitive Complexity of 10 (exceeds 7 allowed). Consider refactoring. Open
def mode_cycles(last_updated_date=None): # Request data soap_arguments = { "RequestorID": "TalentMAP", "Action": "GET",
- Read upRead up
Function waiver_status_changed
has a Cognitive Complexity of 10 (exceeds 7 allowed). Consider refactoring. Open
def waiver_status_changed(sender, instance, **kwargs): notification_bodies = instance.generate_status_messages() # If our instance has an id, we're performing an update (and not a create) if instance.id:
- Read upRead up
Function __init__
has 7 arguments (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, model, instance_tag, tag_map, collision_behavior=None, collision_field=None, override_loading_method=None, logger=None):
Avoid deeply nested control flow statements. Open
if data and len(data.strip()) > 0: setattr(instance, self.tag_map[key], data) else:
Avoid deeply nested control flow statements. Open
if attempts > max_attempts: logger.error(f"SOAP call for {task} exceeded max attempts.") break else:
Avoid deeply nested control flow statements. Open
for user in users: Notification.objects.create(owner=user, tags=['bidding', f'{instance.status}'], message=notification_bodies[notification])
Avoid deeply nested control flow statements. Open
if self.collision_behavior == 'delete': collisions.delete() new_instances.append(instance) elif self.collision_behavior == 'update': # Update our collided instance
Function xml_etree_to_dict
has a Cognitive Complexity of 9 (exceeds 7 allowed). Consider refactoring. Open
def xml_etree_to_dict(tree): ''' Converts an XML etree into a dictionary. Args:
- Read upRead up
Avoid too many return
statements within this function. Open
return (True, None)
Function destroy
has a Cognitive Complexity of 8 (exceeds 7 allowed). Consider refactoring. Open
def destroy(self, request, *args, **kwargs): ''' Closes or deletes specified bid This endpoint will delete bids which are still in a draft status, but close any other status
- Read upRead up
Function update_relationships
has a Cognitive Complexity of 8 (exceeds 7 allowed). Consider refactoring. Open
def update_relationships(self): # Search for country based on location prefix country = Country.objects.filter(location_prefix=self.code[:2]) if country.count() != 1: # Try matching by name
- Read upRead up