From 5d7e58c3cbc2d836f22b3b945b0501753028595b Mon Sep 17 00:00:00 2001 From: Amit <43564590+amitvadhel@users.noreply.github.com> Date: Thu, 9 May 2019 17:52:31 +0300 Subject: [PATCH] INCR-152: Run python-modernize on openedx/core/djangoapps/crawlers (#20487) --- openedx/core/djangoapps/crawlers/admin.py | 2 ++ openedx/core/djangoapps/crawlers/migrations/0001_initial.py | 2 +- .../djangoapps/crawlers/migrations/0002_auto_20170419_0018.py | 2 +- openedx/core/djangoapps/crawlers/models.py | 2 ++ openedx/core/djangoapps/crawlers/tests/test_models.py | 2 ++ 5 files changed, 8 insertions(+), 2 deletions(-) diff --git a/openedx/core/djangoapps/crawlers/admin.py b/openedx/core/djangoapps/crawlers/admin.py index a2d2953069..068000189d 100644 --- a/openedx/core/djangoapps/crawlers/admin.py +++ b/openedx/core/djangoapps/crawlers/admin.py @@ -1,4 +1,6 @@ """Admin panel for configuring which user agents we consider to be Crawlers.""" +from __future__ import absolute_import + from config_models.admin import ConfigurationModelAdmin from django.contrib import admin diff --git a/openedx/core/djangoapps/crawlers/migrations/0001_initial.py b/openedx/core/djangoapps/crawlers/migrations/0001_initial.py index 0b95a9ec4b..84e068ef49 100644 --- a/openedx/core/djangoapps/crawlers/migrations/0001_initial.py +++ b/openedx/core/djangoapps/crawlers/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals +from __future__ import absolute_import, unicode_literals from django.db import migrations, models import django.db.models.deletion diff --git a/openedx/core/djangoapps/crawlers/migrations/0002_auto_20170419_0018.py b/openedx/core/djangoapps/crawlers/migrations/0002_auto_20170419_0018.py index 288c92efb8..56bf335397 100644 --- a/openedx/core/djangoapps/crawlers/migrations/0002_auto_20170419_0018.py +++ b/openedx/core/djangoapps/crawlers/migrations/0002_auto_20170419_0018.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals +from __future__ import absolute_import, unicode_literals from django.db import migrations, models diff --git a/openedx/core/djangoapps/crawlers/models.py b/openedx/core/djangoapps/crawlers/models.py index 56719c731a..24263e5c04 100644 --- a/openedx/core/djangoapps/crawlers/models.py +++ b/openedx/core/djangoapps/crawlers/models.py @@ -2,6 +2,8 @@ This module handles the detection of crawlers, so that we can handle them appropriately in other parts of the code. """ +from __future__ import absolute_import + import six from config_models.models import ConfigurationModel from django.db import models diff --git a/openedx/core/djangoapps/crawlers/tests/test_models.py b/openedx/core/djangoapps/crawlers/tests/test_models.py index 0e60f398d4..d477a9e95e 100644 --- a/openedx/core/djangoapps/crawlers/tests/test_models.py +++ b/openedx/core/djangoapps/crawlers/tests/test_models.py @@ -2,6 +2,8 @@ """ Tests that the request came from a crawler or not. """ +from __future__ import absolute_import + import ddt from django.test import TestCase from django.http import HttpRequest