summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2014-05-15 19:41:55 +0200
committerClaude Paroz <claude@2xlibre.net>2014-05-15 19:58:41 +0200
commite520a73eeea6b185b719901ab9985ecef00e5664 (patch)
treeaabb1eec8506c7320b00346440b17d19f7116b0e
parent27aa85246a218b0999c7c9d227eed2afb08ed510 (diff)
Harmonized some PEP 0263 coding preambles
-rw-r--r--django/contrib/flatpages/tests/test_models.py2
-rw-r--r--django/contrib/gis/tests/layermap/tests.py2
-rw-r--r--django/core/checks/__init__.py2
-rw-r--r--django/core/management/commands/migrate.py2
-rw-r--r--django/core/management/commands/sqlmigrate.py2
-rw-r--r--django/db/migrations/writer.py2
-rw-r--r--docs/ref/migration-operations.txt2
-rw-r--r--docs/topics/migrations.txt4
-rw-r--r--tests/admin_ordering/models.py2
-rw-r--r--tests/admin_views/tests.py2
-rw-r--r--tests/admin_widgets/tests.py2
-rw-r--r--tests/aggregation/models.py2
-rw-r--r--tests/aggregation_regress/models.py2
-rw-r--r--tests/basic/models.py2
-rw-r--r--tests/handlers/tests.py2
-rw-r--r--tests/i18n/contenttypes/tests.py2
-rw-r--r--tests/inline_formsets/models.py2
-rw-r--r--tests/mail/tests.py2
-rw-r--r--tests/migrations/test_autodetector.py2
-rw-r--r--tests/migrations/test_commands.py2
-rw-r--r--tests/migrations/test_migrations/0001_initial.py2
-rw-r--r--tests/migrations/test_migrations/0002_second.py2
-rw-r--r--tests/migrations/test_migrations_2/0001_initial.py2
-rw-r--r--tests/migrations/test_migrations_conflict/0001_initial.py2
-rw-r--r--tests/migrations/test_migrations_conflict/0002_conflicting_second.py2
-rw-r--r--tests/migrations/test_migrations_conflict/0002_second.py2
-rw-r--r--tests/migrations/test_migrations_custom_user/0001_initial.py2
-rw-r--r--tests/migrations/test_migrations_squashed/0001_initial.py2
-rw-r--r--tests/migrations/test_migrations_squashed/0001_squashed_0002.py2
-rw-r--r--tests/migrations/test_migrations_squashed/0002_second.py2
-rw-r--r--tests/migrations/test_migrations_unmigdep/0001_initial.py2
-rw-r--r--tests/migrations/test_optimizer.py2
-rw-r--r--tests/migrations/test_writer.py2
-rw-r--r--tests/model_regress/models.py2
-rw-r--r--tests/modeladmin/models.py2
-rw-r--r--tests/template_tests/filters.py2
-rw-r--r--tests/template_tests/test_context.py2
-rw-r--r--tests/template_tests/urls.py2
-rw-r--r--tests/test_client/tests.py2
-rw-r--r--tests/text/tests.py2
-rw-r--r--tests/utils_tests/test_jslex.py2
-rw-r--r--tests/view_tests/tests/test_json.py2
-rw-r--r--tests/view_tests/tests/test_specials.py2
-rw-r--r--tests/view_tests/urls.py2
44 files changed, 45 insertions, 45 deletions
diff --git a/django/contrib/flatpages/tests/test_models.py b/django/contrib/flatpages/tests/test_models.py
index af12c420e0..f091f3e0ea 100644
--- a/django/contrib/flatpages/tests/test_models.py
+++ b/django/contrib/flatpages/tests/test_models.py
@@ -1,4 +1,4 @@
-# coding: utf-8
+# -*- coding: utf-8 -*-
from __future__ import unicode_literals
diff --git a/django/contrib/gis/tests/layermap/tests.py b/django/contrib/gis/tests/layermap/tests.py
index df6f22c38a..ff00db3748 100644
--- a/django/contrib/gis/tests/layermap/tests.py
+++ b/django/contrib/gis/tests/layermap/tests.py
@@ -1,4 +1,4 @@
-# coding: utf-8
+# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from copy import copy
diff --git a/django/core/checks/__init__.py b/django/core/checks/__init__.py
index cd4d5cebea..0d2780abd3 100644
--- a/django/core/checks/__init__.py
+++ b/django/core/checks/__init__.py
@@ -1,4 +1,4 @@
-# -*- coding: utf8 -*-
+# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from .messages import (CheckMessage,
diff --git a/django/core/management/commands/migrate.py b/django/core/management/commands/migrate.py
index a48e10bed0..fffa1ebe6e 100644
--- a/django/core/management/commands/migrate.py
+++ b/django/core/management/commands/migrate.py
@@ -1,4 +1,4 @@
-# encoding: utf8
+# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from optparse import make_option
from collections import OrderedDict
diff --git a/django/core/management/commands/sqlmigrate.py b/django/core/management/commands/sqlmigrate.py
index e828733f2c..e8ced69c21 100644
--- a/django/core/management/commands/sqlmigrate.py
+++ b/django/core/management/commands/sqlmigrate.py
@@ -1,4 +1,4 @@
-# encoding: utf8
+# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from optparse import make_option
diff --git a/django/db/migrations/writer.py b/django/db/migrations/writer.py
index 0e2eeef85a..da6aed4308 100644
--- a/django/db/migrations/writer.py
+++ b/django/db/migrations/writer.py
@@ -304,7 +304,7 @@ class MigrationWriter(object):
MIGRATION_TEMPLATE = """\
-# encoding: utf8
+# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
diff --git a/docs/ref/migration-operations.txt b/docs/ref/migration-operations.txt
index 9c7a5d497e..40ef3849ac 100644
--- a/docs/ref/migration-operations.txt
+++ b/docs/ref/migration-operations.txt
@@ -192,7 +192,7 @@ class in the migration file, and just pass it to ``RunPython``. Here's an
example of using ``RunPython`` to create some initial objects on a ``Country``
model::
- # encoding: utf8
+ # -*- coding: utf-8 -*-
from django.db import models, migrations
def forwards_func(apps, schema_editor):
diff --git a/docs/topics/migrations.txt b/docs/topics/migrations.txt
index 4f75fcff56..8a5359fec4 100644
--- a/docs/topics/migrations.txt
+++ b/docs/topics/migrations.txt
@@ -338,7 +338,7 @@ the file in the right place, suggest a name, and add dependencies for you)::
Then, open up the file; it should look something like this::
- # encoding: utf8
+ # -*- coding: utf-8 -*-
from django.db import models, migrations
class Migration(migrations.Migration):
@@ -365,7 +365,7 @@ combined values of ``first_name`` and ``last_name`` (we've come to our senses
and realized that not everyone has first and last names). All we
need to do is use the historical model and iterate over the rows::
- # encoding: utf8
+ # -*- coding: utf-8 -*-
from django.db import models, migrations
def combine_names(apps, schema_editor):
diff --git a/tests/admin_ordering/models.py b/tests/admin_ordering/models.py
index fb99d2dac5..91831edc2b 100644
--- a/tests/admin_ordering/models.py
+++ b/tests/admin_ordering/models.py
@@ -1,4 +1,4 @@
-# coding: utf-8
+# -*- coding: utf-8 -*-
from django.contrib import admin
from django.db import models
diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py
index 9742fa2ef5..32914c33a4 100644
--- a/tests/admin_views/tests.py
+++ b/tests/admin_views/tests.py
@@ -1,4 +1,4 @@
-# coding: utf-8
+# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
diff --git a/tests/admin_widgets/tests.py b/tests/admin_widgets/tests.py
index 5a912e2fa3..d07e90a1be 100644
--- a/tests/admin_widgets/tests.py
+++ b/tests/admin_widgets/tests.py
@@ -1,4 +1,4 @@
-# encoding: utf-8
+# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from datetime import datetime, timedelta
diff --git a/tests/aggregation/models.py b/tests/aggregation/models.py
index 691737c17e..0ca20def3e 100644
--- a/tests/aggregation/models.py
+++ b/tests/aggregation/models.py
@@ -1,4 +1,4 @@
-# coding: utf-8
+# -*- coding: utf-8 -*-
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
diff --git a/tests/aggregation_regress/models.py b/tests/aggregation_regress/models.py
index 4d495b4a75..e8714668ba 100644
--- a/tests/aggregation_regress/models.py
+++ b/tests/aggregation_regress/models.py
@@ -1,4 +1,4 @@
-# coding: utf-8
+# -*- coding: utf-8 -*-
from django.contrib.contenttypes.fields import (
GenericForeignKey, GenericRelation
)
diff --git a/tests/basic/models.py b/tests/basic/models.py
index 5e67b0dca9..d9fa08a056 100644
--- a/tests/basic/models.py
+++ b/tests/basic/models.py
@@ -1,4 +1,4 @@
-# coding: utf-8
+# -*- coding: utf-8 -*-
"""
1. Bare-bones model
diff --git a/tests/handlers/tests.py b/tests/handlers/tests.py
index b36d8dbfdd..178f42d8a9 100644
--- a/tests/handlers/tests.py
+++ b/tests/handlers/tests.py
@@ -1,4 +1,4 @@
-# coding: utf-8
+# -*- coding: utf-8 -*-
from __future__ import unicode_literals
diff --git a/tests/i18n/contenttypes/tests.py b/tests/i18n/contenttypes/tests.py
index 3e25867616..70314b737b 100644
--- a/tests/i18n/contenttypes/tests.py
+++ b/tests/i18n/contenttypes/tests.py
@@ -1,4 +1,4 @@
-# coding: utf-8
+# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
diff --git a/tests/inline_formsets/models.py b/tests/inline_formsets/models.py
index 383122dbd7..f29362e321 100644
--- a/tests/inline_formsets/models.py
+++ b/tests/inline_formsets/models.py
@@ -1,4 +1,4 @@
-# coding: utf-8
+# -*- coding: utf-8 -*-
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
diff --git a/tests/mail/tests.py b/tests/mail/tests.py
index 37b18704c7..11577ff159 100644
--- a/tests/mail/tests.py
+++ b/tests/mail/tests.py
@@ -1,4 +1,4 @@
-# coding: utf-8
+# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import asyncore
diff --git a/tests/migrations/test_autodetector.py b/tests/migrations/test_autodetector.py
index 510fd27b0b..54361f00ed 100644
--- a/tests/migrations/test_autodetector.py
+++ b/tests/migrations/test_autodetector.py
@@ -1,4 +1,4 @@
-# encoding: utf8
+# -*- coding: utf-8 -*-
from django.test import TestCase, override_settings
from django.db.migrations.autodetector import MigrationAutodetector
from django.db.migrations.questioner import MigrationQuestioner
diff --git a/tests/migrations/test_commands.py b/tests/migrations/test_commands.py
index 74881f8510..129e80b92c 100644
--- a/tests/migrations/test_commands.py
+++ b/tests/migrations/test_commands.py
@@ -184,7 +184,7 @@ class MakeMigrationsTests(MigrationTestBase):
with codecs.open(initial_file, 'r', encoding='utf-8') as fp:
content = fp.read()
- self.assertTrue('# encoding: utf8' in content)
+ self.assertTrue('# -*- coding: utf-8 -*-' in content)
self.assertTrue('migrations.CreateModel' in content)
if six.PY3:
diff --git a/tests/migrations/test_migrations/0001_initial.py b/tests/migrations/test_migrations/0001_initial.py
index 3544610eb4..581d536814 100644
--- a/tests/migrations/test_migrations/0001_initial.py
+++ b/tests/migrations/test_migrations/0001_initial.py
@@ -1,4 +1,4 @@
-# encoding: utf8
+# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
diff --git a/tests/migrations/test_migrations/0002_second.py b/tests/migrations/test_migrations/0002_second.py
index 5da381677c..9dd60fade2 100644
--- a/tests/migrations/test_migrations/0002_second.py
+++ b/tests/migrations/test_migrations/0002_second.py
@@ -1,4 +1,4 @@
-# encoding: utf8
+# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
diff --git a/tests/migrations/test_migrations_2/0001_initial.py b/tests/migrations/test_migrations_2/0001_initial.py
index cb15a04956..02cbd97fcc 100644
--- a/tests/migrations/test_migrations_2/0001_initial.py
+++ b/tests/migrations/test_migrations_2/0001_initial.py
@@ -1,4 +1,4 @@
-# encoding: utf8
+# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
diff --git a/tests/migrations/test_migrations_conflict/0001_initial.py b/tests/migrations/test_migrations_conflict/0001_initial.py
index 3544610eb4..581d536814 100644
--- a/tests/migrations/test_migrations_conflict/0001_initial.py
+++ b/tests/migrations/test_migrations_conflict/0001_initial.py
@@ -1,4 +1,4 @@
-# encoding: utf8
+# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
diff --git a/tests/migrations/test_migrations_conflict/0002_conflicting_second.py b/tests/migrations/test_migrations_conflict/0002_conflicting_second.py
index cf83d7b036..4057636177 100644
--- a/tests/migrations/test_migrations_conflict/0002_conflicting_second.py
+++ b/tests/migrations/test_migrations_conflict/0002_conflicting_second.py
@@ -1,4 +1,4 @@
-# encoding: utf8
+# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
diff --git a/tests/migrations/test_migrations_conflict/0002_second.py b/tests/migrations/test_migrations_conflict/0002_second.py
index 0595de83f0..c525ea08a0 100644
--- a/tests/migrations/test_migrations_conflict/0002_second.py
+++ b/tests/migrations/test_migrations_conflict/0002_second.py
@@ -1,4 +1,4 @@
-# encoding: utf8
+# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
diff --git a/tests/migrations/test_migrations_custom_user/0001_initial.py b/tests/migrations/test_migrations_custom_user/0001_initial.py
index f8e6ce4b0d..d7c37151f1 100644
--- a/tests/migrations/test_migrations_custom_user/0001_initial.py
+++ b/tests/migrations/test_migrations_custom_user/0001_initial.py
@@ -1,4 +1,4 @@
-# encoding: utf8
+# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
diff --git a/tests/migrations/test_migrations_squashed/0001_initial.py b/tests/migrations/test_migrations_squashed/0001_initial.py
index 3544610eb4..581d536814 100644
--- a/tests/migrations/test_migrations_squashed/0001_initial.py
+++ b/tests/migrations/test_migrations_squashed/0001_initial.py
@@ -1,4 +1,4 @@
-# encoding: utf8
+# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
diff --git a/tests/migrations/test_migrations_squashed/0001_squashed_0002.py b/tests/migrations/test_migrations_squashed/0001_squashed_0002.py
index b357e3f6f8..a5f591cbf7 100644
--- a/tests/migrations/test_migrations_squashed/0001_squashed_0002.py
+++ b/tests/migrations/test_migrations_squashed/0001_squashed_0002.py
@@ -1,4 +1,4 @@
-# encoding: utf8
+# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
diff --git a/tests/migrations/test_migrations_squashed/0002_second.py b/tests/migrations/test_migrations_squashed/0002_second.py
index 0595de83f0..c525ea08a0 100644
--- a/tests/migrations/test_migrations_squashed/0002_second.py
+++ b/tests/migrations/test_migrations_squashed/0002_second.py
@@ -1,4 +1,4 @@
-# encoding: utf8
+# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
diff --git a/tests/migrations/test_migrations_unmigdep/0001_initial.py b/tests/migrations/test_migrations_unmigdep/0001_initial.py
index ff19085563..6503f9f05b 100644
--- a/tests/migrations/test_migrations_unmigdep/0001_initial.py
+++ b/tests/migrations/test_migrations_unmigdep/0001_initial.py
@@ -1,4 +1,4 @@
-# encoding: utf8
+# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
diff --git a/tests/migrations/test_optimizer.py b/tests/migrations/test_optimizer.py
index b73c41a698..346d30ae28 100644
--- a/tests/migrations/test_optimizer.py
+++ b/tests/migrations/test_optimizer.py
@@ -1,4 +1,4 @@
-# encoding: utf8
+# -*- coding: utf-8 -*-
from django.test import TestCase
from django.db.migrations.optimizer import MigrationOptimizer
diff --git a/tests/migrations/test_writer.py b/tests/migrations/test_writer.py
index 6a85ba8ca3..58b5aa6cac 100644
--- a/tests/migrations/test_writer.py
+++ b/tests/migrations/test_writer.py
@@ -1,4 +1,4 @@
-# encoding: utf8
+# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime
diff --git a/tests/model_regress/models.py b/tests/model_regress/models.py
index 82efb9c783..7dacfc9c90 100644
--- a/tests/model_regress/models.py
+++ b/tests/model_regress/models.py
@@ -1,4 +1,4 @@
-# coding: utf-8
+# -*- coding: utf-8 -*-
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
diff --git a/tests/modeladmin/models.py b/tests/modeladmin/models.py
index 8f57a9fa82..8457e60876 100644
--- a/tests/modeladmin/models.py
+++ b/tests/modeladmin/models.py
@@ -1,4 +1,4 @@
-# coding: utf-8
+# -*- coding: utf-8 -*-
from django.contrib.auth.models import User
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
diff --git a/tests/template_tests/filters.py b/tests/template_tests/filters.py
index 9fa6918f92..e13db66e96 100644
--- a/tests/template_tests/filters.py
+++ b/tests/template_tests/filters.py
@@ -1,4 +1,4 @@
-# coding: utf-8
+# -*- coding: utf-8 -*-
"""
Tests for template filters (as opposed to template tags).
diff --git a/tests/template_tests/test_context.py b/tests/template_tests/test_context.py
index dac74b36e3..c5ad3e1d50 100644
--- a/tests/template_tests/test_context.py
+++ b/tests/template_tests/test_context.py
@@ -1,4 +1,4 @@
-# coding: utf-8
+# -*- coding: utf-8 -*-
from unittest import TestCase
diff --git a/tests/template_tests/urls.py b/tests/template_tests/urls.py
index a93d4c4649..f1c8632c06 100644
--- a/tests/template_tests/urls.py
+++ b/tests/template_tests/urls.py
@@ -1,4 +1,4 @@
-# coding: utf-8
+# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf.urls import url
diff --git a/tests/test_client/tests.py b/tests/test_client/tests.py
index 5f4d7c11db..a04b14472f 100644
--- a/tests/test_client/tests.py
+++ b/tests/test_client/tests.py
@@ -1,4 +1,4 @@
-# coding: utf-8
+# -*- coding: utf-8 -*-
"""
39. Testing using the Test Client
diff --git a/tests/text/tests.py b/tests/text/tests.py
index c14f3baf82..9ac6414b21 100644
--- a/tests/text/tests.py
+++ b/tests/text/tests.py
@@ -1,4 +1,4 @@
-# coding: utf-8
+# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.test import TestCase
diff --git a/tests/utils_tests/test_jslex.py b/tests/utils_tests/test_jslex.py
index 0b5081c540..0337b95fa2 100644
--- a/tests/utils_tests/test_jslex.py
+++ b/tests/utils_tests/test_jslex.py
@@ -1,5 +1,5 @@
+# -*- coding: utf-8 -*-
"""Tests for jslex."""
-# encoding: utf-8
# originally from https://bitbucket.org/ned/jslex
from django.test import TestCase
diff --git a/tests/view_tests/tests/test_json.py b/tests/view_tests/tests/test_json.py
index 505e7ad732..68ba183090 100644
--- a/tests/view_tests/tests/test_json.py
+++ b/tests/view_tests/tests/test_json.py
@@ -1,4 +1,4 @@
-# encoding: utf8
+# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import json
diff --git a/tests/view_tests/tests/test_specials.py b/tests/view_tests/tests/test_specials.py
index a26280da1e..0af9033ae7 100644
--- a/tests/view_tests/tests/test_specials.py
+++ b/tests/view_tests/tests/test_specials.py
@@ -1,4 +1,4 @@
-# coding: utf-8
+# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.test import TestCase, override_settings
diff --git a/tests/view_tests/urls.py b/tests/view_tests/urls.py
index cd7e46663c..fdb263fa71 100644
--- a/tests/view_tests/urls.py
+++ b/tests/view_tests/urls.py
@@ -1,4 +1,4 @@
-# coding: utf-8
+# -*- coding: utf-8 -*-
from os import path
from django.conf.urls import url, include