Showing 864 of 864 total issues
File agenda.py
has 1062 lines of code (exceeds 250 allowed). Consider refactoring. Open
import csv
import logging
from functools import partial
from urllib.parse import urlencode, quote
from datetime import datetime
File common.py
has 906 lines of code (exceeds 250 allowed). Consider refactoring. Open
import re
import logging
import csv
from datetime import datetime
from copy import deepcopy
Function modify_agenda
has a Cognitive Complexity of 96 (exceeds 7 allowed). Consider refactoring. Open
def modify_agenda(query={}, jwt_token=None, host=None):
'''
Create/Edit Agenda
'''
ai_validation = ai_validator.validate_agenda_item(query)
- 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 common_helpers.py
has 590 lines of code (exceeds 250 allowed). Consider refactoring. Open
import datetime
import logging
import re
import json
import threading
File client.py
has 558 lines of code (exceeds 250 allowed). Consider refactoring. Open
import csv
import logging
from copy import deepcopy
from datetime import datetime
from urllib.parse import urlencode, quote
File assignment_cycles.py
has 498 lines of code (exceeds 250 allowed). Consider refactoring. Open
from datetime import datetime as dt
from functools import partial
import logging
from talentmap_api.fsbid.services import common as services
from talentmap_api.common.common_helpers import service_response
File positions.py
has 447 lines of code (exceeds 250 allowed). Consider refactoring. Open
import logging
from urllib.parse import urlencode, quote
import pydash
from django.conf import settings
File settings.py
has 436 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""
Django settings for talentmap_api project.
Generated by 'django-admin startproject' using Django 1.11.2.
File available_positions.py
has 399 lines of code (exceeds 250 allowed). Consider refactoring. Open
import logging
from functools import partial
import pydash
from django.conf import settings
File bureau.py
has 377 lines of code (exceeds 250 allowed). Consider refactoring. Open
import logging
from urllib.parse import urlencode, quote
from functools import partial
from copy import deepcopy
File admin_projected_vacancies.py
has 366 lines of code (exceeds 250 allowed). Consider refactoring. Open
import logging
import requests # pylint: disable=unused-import
from talentmap_api.fsbid.services import common as services
from talentmap_api.common.common_helpers import service_response
Function get_available_bidders_stats
has a Cognitive Complexity of 34 (exceeds 7 allowed). Consider refactoring. Open
def get_available_bidders_stats(data):
'''
Returns all Available Bidders statistics
'''
stats = {
- 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
Consider simplifying this complex logical expression. Open
if type(assignmentsCopy) is type([]):
for x in assignmentsCopy:
pos = pydash.get(x, 'position[0]') or {}
loc = pydash.get(pos, 'location[0]') or {}
tmap_assignments.append(
File admin_panel.py
has 358 lines of code (exceeds 250 allowed). Consider refactoring. Open
import logging
from functools import partial
import pydash
import jwt
Function el_postions_req_mapping
has a Cognitive Complexity of 32 (exceeds 7 allowed). Consider refactoring. Open
def el_postions_req_mapping(request):
result = {
'PV_API_VERSION_I': '',
'PV_AD_ID_I': '',
}
- 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 parse_agenda_remarks
has a Cognitive Complexity of 30 (exceeds 7 allowed). Consider refactoring. Open
def parse_agenda_remarks(remarks=[]):
remarks_values = []
if remarks:
for remark in remarks:
remark['remarkRefData'][0]['airaiseqnum'] = remark.get('airaiseqnum')
- 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 available_position.py
has 336 lines of code (exceeds 250 allowed). Consider refactoring. Open
import logging
import coreapi
import pydash
from django.core.exceptions import PermissionDenied, SuspiciousOperation
Function get_ap_and_pv_csv
has a Cognitive Complexity of 29 (exceeds 7 allowed). Consider refactoring. Open
def get_ap_and_pv_csv(data, filename, ap=False, tandem=False):
response = HttpResponse(content_type='text/csv')
response['Content-Disposition'] = f"attachment; filename={filename}_{datetime.now().strftime('%Y_%m_%d_%H%M%S')}.csv"
writer = csv.writer(response, csv.excel)
- 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 modify_panel_meeting_and_dates
has a Cognitive Complexity of 28 (exceeds 7 allowed). Consider refactoring. Open
def modify_panel_meeting_and_dates(query, jwt_token):
'''
Modify Panel Meeting and Panel Meeting Dates
'''
# Inject decoded hru
- 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 create_models_from_csv
has a Cognitive Complexity of 27 (exceeds 7 allowed). Consider refactoring. Open
def create_models_from_csv(self, csv_filepath):
'''
Loads data from an CSV file into a model, using a defined mapping of fields
to CSV column titles.
- 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"