Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
domdinicola committed Mar 23, 2021
1 parent e709494 commit 6c9cc10
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ max-complexity = 19
max-line-length = 160
filename = .py
exclude = .tox,migrations,.git,docs,diff_match_patch.py,deploy/**,settings
ignore = E731
ignore = E731, W504
9 changes: 3 additions & 6 deletions src/etools_datamart/apps/mart/prp/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,12 @@
"""
from ast import literal_eval

from django.db import models, transaction
from django.db import models
from django.db.models import JSONField, Q
from django.utils import timezone

from strategy_field.utils import get_attr

from etools_datamart.apps.etl.exceptions import MaxRecordsException, RequiredIsMissing, RequiredIsRunning
from etools_datamart.apps.etl.loader import BaseLoader, EtlResult, logger, RUN_UNKNOWN
from etools_datamart.apps.etl.loader import CommonLoader
from etools_datamart.apps.sources.source_prp.models import (
CoreCountry,
CoreGatewaytype,
Expand All @@ -69,7 +67,6 @@
UnicefProgrammedocumentSections,
UnicefProgressreport,
)
from etools_datamart.sentry import process_exception

from .base import PrpDataMartModel

Expand Down Expand Up @@ -177,7 +174,7 @@ def get_locations(self, record: IndicatorIndicatorlocationdata, values, **kwargs
levelname=location.gateway.name
))
values['locations_data'] = locs
return ", ".join([l['name'] for l in locs])
return ", ".join([loc['name'] for loc in locs])

def get_submitted_by(self, record: IndicatorIndicatorlocationdata, values, **kwargs):
user = get_attr(record, 'indicator_report.progress_report.submitted_by')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Generated by Django 2.2.11 on 2020-06-03 17:43

import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):
Expand Down
2 changes: 1 addition & 1 deletion tests/_test_lib/test_utilities/factories/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
from .data import * # noqa
from .etools import * # noqa
from .prp import * # noqa
from .unpp import * # noqa
from .rapidpro import * # noqa
from .unpp import * # noqa
2 changes: 1 addition & 1 deletion tests/api/interfaces/unpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ def client(self):

def frozenfixture2(use_request=False):
def deco(func):
from drf_api_checker.utils import load_fixtures, dump_fixtures
from drf_api_checker.fs import mktree
from drf_api_checker.utils import dump_fixtures, load_fixtures

@wraps(func)
def _inner(*args, **kwargs):
Expand Down

0 comments on commit 6c9cc10

Please sign in to comment.