Harmonized some PEP 0263 coding preambles

This commit is contained in:
Claude Paroz 2014-05-15 19:41:55 +02:00
parent 27aa85246a
commit e520a73eee
44 changed files with 45 additions and 45 deletions

View File

@ -1,4 +1,4 @@
# coding: utf-8
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

View File

@ -1,4 +1,4 @@
# coding: utf-8
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from copy import copy

View File

@ -1,4 +1,4 @@
# -*- coding: utf8 -*-
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from .messages import (CheckMessage,

View File

@ -1,4 +1,4 @@
# encoding: utf8
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from optparse import make_option
from collections import OrderedDict

View File

@ -1,4 +1,4 @@
# encoding: utf8
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from optparse import make_option

View File

@ -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

View File

@ -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):

View File

@ -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):

View File

@ -1,4 +1,4 @@
# coding: utf-8
# -*- coding: utf-8 -*-
from django.contrib import admin
from django.db import models

View File

@ -1,4 +1,4 @@
# coding: utf-8
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os

View File

@ -1,4 +1,4 @@
# encoding: utf-8
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from datetime import datetime, timedelta

View File

@ -1,4 +1,4 @@
# coding: utf-8
# -*- coding: utf-8 -*-
from django.db import models
from django.utils.encoding import python_2_unicode_compatible

View File

@ -1,4 +1,4 @@
# coding: utf-8
# -*- coding: utf-8 -*-
from django.contrib.contenttypes.fields import (
GenericForeignKey, GenericRelation
)

View File

@ -1,4 +1,4 @@
# coding: utf-8
# -*- coding: utf-8 -*-
"""
1. Bare-bones model

View File

@ -1,4 +1,4 @@
# coding: utf-8
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

View File

@ -1,4 +1,4 @@
# coding: utf-8
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os

View File

@ -1,4 +1,4 @@
# coding: utf-8
# -*- coding: utf-8 -*-
from django.db import models
from django.utils.encoding import python_2_unicode_compatible

View File

@ -1,4 +1,4 @@
# coding: utf-8
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import asyncore

View File

@ -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

View File

@ -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:

View File

@ -1,4 +1,4 @@
# encoding: utf8
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models

View File

@ -1,4 +1,4 @@
# encoding: utf8
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models

View File

@ -1,4 +1,4 @@
# encoding: utf8
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models

View File

@ -1,4 +1,4 @@
# encoding: utf8
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models

View File

@ -1,4 +1,4 @@
# encoding: utf8
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models

View File

@ -1,4 +1,4 @@
# encoding: utf8
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models

View File

@ -1,4 +1,4 @@
# encoding: utf8
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models

View File

@ -1,4 +1,4 @@
# encoding: utf8
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models

View File

@ -1,4 +1,4 @@
# encoding: utf8
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models

View File

@ -1,4 +1,4 @@
# encoding: utf8
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models

View File

@ -1,4 +1,4 @@
# encoding: utf8
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models

View File

@ -1,4 +1,4 @@
# encoding: utf8
# -*- coding: utf-8 -*-
from django.test import TestCase
from django.db.migrations.optimizer import MigrationOptimizer

View File

@ -1,4 +1,4 @@
# encoding: utf8
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime

View File

@ -1,4 +1,4 @@
# coding: utf-8
# -*- coding: utf-8 -*-
from django.db import models
from django.utils.encoding import python_2_unicode_compatible

View File

@ -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

View File

@ -1,4 +1,4 @@
# coding: utf-8
# -*- coding: utf-8 -*-
"""
Tests for template filters (as opposed to template tags).

View File

@ -1,4 +1,4 @@
# coding: utf-8
# -*- coding: utf-8 -*-
from unittest import TestCase

View File

@ -1,4 +1,4 @@
# coding: utf-8
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf.urls import url

View File

@ -1,4 +1,4 @@
# coding: utf-8
# -*- coding: utf-8 -*-
"""
39. Testing using the Test Client

View File

@ -1,4 +1,4 @@
# coding: utf-8
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.test import TestCase

View File

@ -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

View File

@ -1,4 +1,4 @@
# encoding: utf8
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import json

View File

@ -1,4 +1,4 @@
# coding: utf-8
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.test import TestCase, override_settings

View File

@ -1,4 +1,4 @@
# coding: utf-8
# -*- coding: utf-8 -*-
from os import path
from django.conf.urls import url, include