Skip to content

Commit

Permalink
Run code checks
Browse files Browse the repository at this point in the history
  • Loading branch information
norkans7 committed Oct 5, 2023
1 parent 726e183 commit d1d8d0f
Show file tree
Hide file tree
Showing 17 changed files with 19 additions and 28 deletions.
3 changes: 1 addition & 2 deletions ureport/admins/views.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals

from smartmin.views import SmartCRUDL, SmartUpdateView

from django import forms
from django.utils.translation import gettext_lazy as _

from dash.orgs.models import Org
from dash.orgs.views import OrgPermsMixin
from smartmin.views import SmartCRUDL, SmartUpdateView
from ureport.admins import OrgCache, refresh_caches


Expand Down
3 changes: 1 addition & 2 deletions ureport/assets/models.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals

from smartmin.models import SmartModel

from django.db import models
from django.utils.translation import gettext_lazy as _

from dash.orgs.models import Org
from smartmin.models import SmartModel

BANNER = "B"
PATTERN = "P"
Expand Down
3 changes: 1 addition & 2 deletions ureport/assets/views.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals

from smartmin.views import SmartCreateView, SmartCRUDL, SmartListView, SmartUpdateView

from django.db.models.functions import Lower

from dash.orgs.views import OrgObjPermsMixin, OrgPermsMixin
from smartmin.views import SmartCreateView, SmartCRUDL, SmartListView, SmartUpdateView
from ureport.assets.models import Image


Expand Down
3 changes: 1 addition & 2 deletions ureport/bots/models.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
from smartmin.models import SmartModel

from django.db import models
from django.utils.translation import gettext_lazy as _

from dash.orgs.models import Org
from smartmin.models import SmartModel


class Bot(SmartModel):
Expand Down
3 changes: 1 addition & 2 deletions ureport/bots/views.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
from smartmin.views import SmartCreateView, SmartCRUDL, SmartListView, SmartUpdateView

from django import forms
from django.db.models.functions import Lower
from django.utils.translation import gettext_lazy as _

from dash.orgs.views import OrgObjPermsMixin, OrgPermsMixin
from smartmin.views import SmartCreateView, SmartCRUDL, SmartListView, SmartUpdateView
from ureport.bots.models import Bot


Expand Down
3 changes: 2 additions & 1 deletion ureport/countries/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
import regex
import six
from django_countries.fields import CountryField
from smartmin.models import SmartModel

from django.db import models
from django.utils.translation import gettext_lazy as _

from smartmin.models import SmartModel


class CountryAlias(SmartModel):
country = CountryField()
Expand Down
4 changes: 2 additions & 2 deletions ureport/countries/views.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals

from smartmin.views import SmartCreateView, SmartCRUDL, SmartListView, SmartUpdateView

from django import forms

from smartmin.views import SmartCreateView, SmartCRUDL, SmartListView, SmartUpdateView

from .models import CountryAlias


Expand Down
2 changes: 1 addition & 1 deletion ureport/jobs/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import feedparser
import six
from smartmin.models import SmartModel

from django.conf import settings
from django.core.cache import cache
Expand All @@ -14,6 +13,7 @@
from django.utils.translation import gettext_lazy as _

from dash.orgs.models import Org
from smartmin.models import SmartModel

RSS_JOBS_FEED_CACHE_TIME = getattr(settings, "RSS_JOBS_FEED_CACHE_TIME", 60 * 60 * 6)
RSS_JOBS_KEY = "jobsource:%d:%d"
Expand Down
3 changes: 1 addition & 2 deletions ureport/jobs/views.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals

from smartmin.views import SmartCreateView, SmartCRUDL, SmartListView, SmartUpdateView

from django.utils.translation import gettext_lazy as _

from dash.orgs.views import OrgObjPermsMixin, OrgPermsMixin
from smartmin.views import SmartCreateView, SmartCRUDL, SmartListView, SmartUpdateView
from ureport.jobs.models import JobSource


Expand Down
3 changes: 1 addition & 2 deletions ureport/landingpages/models.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
from functools import partial

from smartmin.models import SmartModel

from django.db import models
from django.utils.translation import gettext_lazy as _

from dash.orgs.models import Org
from dash.utils import generate_file_path
from smartmin.models import SmartModel
from ureport.bots.models import Bot


Expand Down
3 changes: 1 addition & 2 deletions ureport/landingpages/views.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
from smartmin.views import SmartCreateView, SmartCRUDL, SmartListView, SmartUpdateView

from django import forms
from django.db.models.functions import Lower
from django.urls import reverse
from django.utils.safestring import mark_safe
from django.utils.translation import gettext_lazy as _

from dash.orgs.views import OrgObjPermsMixin, OrgPermsMixin
from smartmin.views import SmartCreateView, SmartCRUDL, SmartListView, SmartUpdateView
from ureport.bots.models import Bot
from ureport.landingpages.models import LandingPage

Expand Down
3 changes: 1 addition & 2 deletions ureport/news/models.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals

from smartmin.models import SmartModel

from django.db import models
from django.utils import formats
from django.utils.translation import gettext_lazy as _

from dash.categories.models import Category
from dash.orgs.models import Org
from smartmin.models import SmartModel


class NewsItem(SmartModel):
Expand Down
3 changes: 1 addition & 2 deletions ureport/news/views.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals

from smartmin.views import SmartCreateView, SmartCRUDL, SmartListView, SmartUpdateView

from django import forms

from dash.categories.fields import CategoryChoiceField
from dash.categories.models import Category
from dash.orgs.views import OrgObjPermsMixin, OrgPermsMixin
from smartmin.views import SmartCreateView, SmartCRUDL, SmartListView, SmartUpdateView

from .models import NewsItem, Video

Expand Down
2 changes: 1 addition & 1 deletion ureport/polls/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import six
from django_redis import get_redis_connection
from smartmin.models import SmartModel

from django.conf import settings
from django.contrib.auth.models import User
Expand All @@ -25,6 +24,7 @@
from dash.categories.models import Category, CategoryImage
from dash.orgs.models import Org, OrgBackend
from dash.tags.models import Tag
from smartmin.models import SmartModel
from ureport.flows.models import FlowResult, FlowResultCategory

logger = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion ureport/polls/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from datetime import timedelta

from django_redis import get_redis_connection
from smartmin.views import SmartCreateView, SmartCRUDL, SmartListView, SmartUpdateView

from django import forms
from django.core.cache import cache
Expand All @@ -26,6 +25,7 @@
from dash.orgs.models import OrgBackend
from dash.orgs.views import OrgObjPermsMixin, OrgPermsMixin
from dash.tags.models import Tag
from smartmin.views import SmartCreateView, SmartCRUDL, SmartListView, SmartUpdateView
from ureport.utils import json_date_to_datetime

from .models import Poll, PollImage, PollQuestion, PollResponseCategory
Expand Down
2 changes: 1 addition & 1 deletion ureport/public/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import pycountry
import six
from django_redis import get_redis_connection
from smartmin.views import SmartReadView, SmartTemplateView

from django.conf import settings
from django.core.cache import cache
Expand All @@ -30,6 +29,7 @@
from dash.orgs.models import Org, TaskState
from dash.orgs.views import OrgObjPermsMixin
from dash.stories.models import Story, StoryImage
from smartmin.views import SmartReadView, SmartTemplateView
from ureport.assets.models import Image
from ureport.bots.models import Bot
from ureport.countries.models import CountryAlias
Expand Down
2 changes: 1 addition & 1 deletion ureport/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import zoneinfo

from mock import Mock, patch
from smartmin.tests import SmartminTest
from temba_client.v2 import TembaClient
from temba_client.v2.types import (
Contact as TembaContact,
Expand All @@ -29,6 +28,7 @@
from dash.orgs.models import Org
from dash.test import DashTest
from dash.utils import random_string
from smartmin.tests import SmartminTest
from ureport.backend.rapidpro import RapidProBackend
from ureport.flows.models import FlowResult, FlowResultCategory
from ureport.jobs.models import JobSource
Expand Down

0 comments on commit d1d8d0f

Please sign in to comment.