18F/State-TalentMAP-API

View on GitHub
talentmap_api/position/models.py

Summary

Maintainability
C
1 day
Test Coverage

Showing 3 of 3 total issues

File models.py has 356 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import itertools
 
from django.db.models import OuterRef, Subquery
from django.db import models
from djchoices import DjangoChoices, ChoiceItem
Severity: Minor
Found in talentmap_api/position/models.py - About 4 hrs to fix

    Function assignment_pre_save has a Cognitive Complexity of 22 (exceeds 7 allowed). Consider refactoring.
    Open

    def assignment_pre_save(sender, instance, **kwargs):
    '''
    This listener performs operations during the pre-save cylce of the assignment.
    '''
     
     
    Severity: Minor
    Found in talentmap_api/position/models.py - About 2 hrs to fix

    Function update_relationships has a Cognitive Complexity of 14 (exceeds 7 allowed). Consider refactoring.
    Open

    def update_relationships(self):
    '''
    Update the position relationships
    '''
    # Update language requirements
    Severity: Minor
    Found in talentmap_api/position/models.py - About 1 hr to fix

    There are no issues that match your filters.

    Category
    Status