diff --git a/base/migrations/0001_initial.py b/base/migrations/0001_initial.py index c0dfb383a..9457039b5 100644 --- a/base/migrations/0001_initial.py +++ b/base/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals + from django.db import models, migrations diff --git a/comissoes/migrations/0001_initial.py b/comissoes/migrations/0001_initial.py index ef979518b..7a1986fa6 100644 --- a/comissoes/migrations/0001_initial.py +++ b/comissoes/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals + from django.db import models, migrations diff --git a/legacy/migrations/0001_initial.py b/legacy/migrations/0001_initial.py index 81d213e08..e33f36a17 100644 --- a/legacy/migrations/0001_initial.py +++ b/legacy/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals + from django.db import models, migrations diff --git a/legacy/models.py b/legacy/models.py index b38d67abb..ace235d5f 100644 --- a/legacy/models.py +++ b/legacy/models.py @@ -7,7 +7,7 @@ # # Also note: You'll have to insert the output of 'django-admin sqlcustom [app_label]' # into your database. -from __future__ import unicode_literals + from django.db import models diff --git a/legacy/scripts/scrap_original_forms.py b/legacy/scripts/scrap_original_forms.py index bcd037c34..fc813a64a 100644 --- a/legacy/scripts/scrap_original_forms.py +++ b/legacy/scripts/scrap_original_forms.py @@ -6,9 +6,9 @@ import string from bs4 import BeautifulSoup from bs4.element import NavigableString, Tag -from field_renames import field_renames -from migration import appconfs -from utils import listify, getsourcelines +from .field_renames import field_renames +from .migration import appconfs +from .utils import listify, getsourcelines assert appconfs # to prevent removal by automatic organize imports on this file diff --git a/legacy/scripts/study.py b/legacy/scripts/study.py index 84ce53ada..8e6423c9a 100644 --- a/legacy/scripts/study.py +++ b/legacy/scripts/study.py @@ -1,6 +1,6 @@ from django.apps import apps -from migration_base import legacy_app +from .migration_base import legacy_app for model in apps.get_app_config('legacy').get_models(): diff --git a/lexml/migrations/0001_initial.py b/lexml/migrations/0001_initial.py index 1008890da..0f7fffb01 100644 --- a/lexml/migrations/0001_initial.py +++ b/lexml/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals + from django.db import models, migrations diff --git a/materia/migrations/0001_initial.py b/materia/migrations/0001_initial.py index aeb0b186b..f40ed6e0a 100644 --- a/materia/migrations/0001_initial.py +++ b/materia/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals + from django.db import models, migrations diff --git a/materia/migrations/0002_auto_20150707_0945.py b/materia/migrations/0002_auto_20150707_0945.py index ff9760ffe..516b81da1 100644 --- a/materia/migrations/0002_auto_20150707_0945.py +++ b/materia/migrations/0002_auto_20150707_0945.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals + from django.db import models, migrations diff --git a/norma/migrations/0001_initial.py b/norma/migrations/0001_initial.py index 86933b59a..e6c60dcdd 100644 --- a/norma/migrations/0001_initial.py +++ b/norma/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals + from django.db import models, migrations diff --git a/parlamentares/migrations/0001_initial.py b/parlamentares/migrations/0001_initial.py index e622969cb..8d9062b99 100644 --- a/parlamentares/migrations/0001_initial.py +++ b/parlamentares/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals + from django.db import models, migrations diff --git a/protocoloadm/migrations/0001_initial.py b/protocoloadm/migrations/0001_initial.py index c83101d49..ebb4363c0 100644 --- a/protocoloadm/migrations/0001_initial.py +++ b/protocoloadm/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals + from django.db import models, migrations diff --git a/sapl/test_utils.py b/sapl/test_utils.py index b005601e3..af97a910e 100644 --- a/sapl/test_utils.py +++ b/sapl/test_utils.py @@ -1,5 +1,5 @@ from pytest import mark -from utils import make_choices +from .utils import make_choices @mark.parametrize("choice_pairs, result", [ diff --git a/sapl/utils.py b/sapl/utils.py index c129bd6ac..1ee18d565 100644 --- a/sapl/utils.py +++ b/sapl/utils.py @@ -15,8 +15,8 @@ def register_all_models_in_admin(module_name): def make_choices(*choice_pairs): assert len(choice_pairs) % 2 == 0 - choice_pairs = iter(choice_pairs) - choices = zip(choice_pairs, choice_pairs) + ipairs = iter(choice_pairs) + choices = list(zip(ipairs, ipairs)) yield choices for key, value in choices: yield key diff --git a/sessao/migrations/0001_initial.py b/sessao/migrations/0001_initial.py index ceb4c7da1..880fe5f19 100644 --- a/sessao/migrations/0001_initial.py +++ b/sessao/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals + from django.db import models, migrations