Skip to content

Commit

Permalink
FLAKE8
Browse files Browse the repository at this point in the history
  • Loading branch information
delcroip committed Oct 17, 2024
1 parent 01e40f6 commit f719420
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 20 deletions.
1 change: 0 additions & 1 deletion policy/gql_queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from .models import Policy
from core import (
prefix_filterset,
filter_validity,
ExtendedConnection,
ExtendedRelayConnection,
)
Expand Down
3 changes: 1 addition & 2 deletions policy/reports/policy_renewals.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from django.db.models import Q, Sum, F, QuerySet
from django.db.models import Q, F, QuerySet

from contribution.models import Premium
from core.models import Officer
from location.models import Location
from policy.models import Policy
Expand Down
1 change: 0 additions & 1 deletion policy/reports/primary_operational_indicators.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from datetime import datetime, timedelta

from dateutil.relativedelta import relativedelta
from django.conf import settings
from django.db import connection

from tools.utils import dictfetchall
Expand Down
5 changes: 2 additions & 3 deletions policy/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
OrderedDjangoFilterConnectionField,
signal_mutation_module_validate,
)
from core.utils import filter_validity
import graphene
from django.core.exceptions import PermissionDenied
from django.db.models import Prefetch
Expand All @@ -17,9 +18,8 @@
from core.models import Officer
from .models import PolicyMutation, Policy
from product.models import Product
from contribution.models import Premium
from insuree.models import Family, Insuree, InsureePolicy
from django.db.models import OuterRef, Subquery, Sum, F, Count
from django.db.models import OuterRef, Subquery, F, Count
from location.apps import LocationConfig

# We do need all queries and mutations in the namespace here.
Expand All @@ -30,7 +30,6 @@
PolicyGQLType,
OfficerGQLType,
PolicyByFamilyOrInsureeConnection,

) # lgtm [py/polluting-import]
from .gql_mutations import (
CreatePolicyMutation,
Expand Down
5 changes: 2 additions & 3 deletions policy/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from django.core.cache import cache

import core
from claim.models import ClaimService, Claim, ClaimItem
from claim.models import Claim, ClaimItem
from django import dispatch
from django.core.exceptions import PermissionDenied, ValidationError
from django.db import connection
Expand All @@ -14,9 +14,8 @@
from django.utils.translation import gettext as _
from graphene.utils.str_converters import to_snake_case

from policy.utils import get_queryset_valid_at_date
from core.signals import register_service_signal
from insuree.models import Insuree, Family, InsureePolicy
from insuree.models import Insuree, InsureePolicy
from insuree.services import create_insuree_renewal_detail
from medical.models import Service, Item
from policy.apps import PolicyConfig
Expand Down
2 changes: 0 additions & 2 deletions policy/signals.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from .apps import PolicyConfig
from core.signals import Signal
from core.service_signals import ServiceSignalBindType
from core.signals import bind_service_signal

_check_formal_sector_for_policy_signal_params = ["user", "policy_id"]
signal_check_formal_sector_for_policy = Signal(
Expand Down
3 changes: 1 addition & 2 deletions policy/test_helpers.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
from contribution.models import Premium
from insuree.models import InsureePolicy, Family, Gender, Insuree
from insuree.models import InsureePolicy
from insuree.test_helpers import create_test_insuree
from policy.models import Policy
from policy.values import policy_values
from product.models import Product
from core.utils import filter_validity
from core.models.user import User
from core.test_helpers import create_test_interactive_user
import datetime

Expand Down
2 changes: 1 addition & 1 deletion policy/tests/tests_reports.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from core.test_helpers import create_test_interactive_user
from rest_framework import status
from rest_framework.test import APITestCase
from dataclasses import copy, dataclass
from dataclasses import dataclass
from graphql_jwt.shortcuts import get_token
from core.models import User
from django.conf import settings
Expand Down
1 change: 0 additions & 1 deletion policy/utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from django.db.models import Func, DateTimeField
from django.db.models.functions import Cast, Coalesce
from calculation.services import run_calculation_rules
from contribution_plan.models import ContributionPlan

Expand Down
4 changes: 0 additions & 4 deletions policy/values.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
from django.utils.translation import gettext as _
from django.db.models import Q, Count
import datetime as py_datetime
from decimal import Decimal
from .models import Policy
from calculation.services import run_calculation_rules
from contract.models import (
ContractContributionPlanDetails as ContractContributionPlanDetailsModel,
)
from core.apps import CoreConfig
from dateutil.relativedelta import relativedelta
from contribution_plan.models import ContributionPlan
Expand Down

0 comments on commit f719420

Please sign in to comment.