Ticket #21298: E301.diff

File E301.diff, 4.7 KB (added by Tim Graham, 11 years ago)
  • django/contrib/messages/storage/cookie.py

    diff --git a/django/contrib/messages/storage/cookie.py b/django/contrib/messages/storage/cookie.py
    index b6c3384..968f3f3 100644
    a b class CookieStorage(BaseStorage):  
    101101            # data is going to be stored eventually by SimpleCookie, which
    102102            # adds it's own overhead, which we must account for.
    103103            cookie = SimpleCookie() # create outside the loop
     104
    104105            def stored_length(val):
    105106                return len(cookie.value_encode(val)[1])
    106107
  • django/utils/html.py

    diff --git a/django/utils/html.py b/django/utils/html.py
    index 391862a..2ae6864 100644
    a b class MLStripper(HTMLParser):  
    118118        HTMLParser.__init__(self)
    119119        self.reset()
    120120        self.fed = []
     121
    121122    def handle_data(self, d):
    122123        self.fed.append(d)
     124
    123125    def handle_entityref(self, name):
    124126        self.fed.append('&%s;' % name)
     127
    125128    def handle_charref(self, name):
    126129        self.fed.append('&#%s;' % name)
     130
    127131    def get_data(self):
    128132        return ''.join(self.fed)
    129133
  • setup.cfg

    diff --git a/setup.cfg b/setup.cfg
    index 50d79b5..1ca4cb1 100644
    a b doc_files = docs extras AUTHORS INSTALL LICENSE README.rst  
    33install-script = scripts/rpm-install.sh
    44
    55[flake8]
    6 exclude=./django/utils/dictconfig.py,./django/contrib/comments/*,./django/utils/unittest.py,./tests/comment_tests/*,./django/test/_doctest.py
    7 ignore=E124,E125,E127,E128,E225,E226,E241,E251,E302,E501,E203,E221,E231,E261,E301,F401,F403,W601
     6exclude=./django/utils/dictconfig.py,./django/contrib/comments/*,./django/utils/unittest.py,./tests/comment_tests/*,./django/test/_doctest.py,./django/utils/six.py
     7ignore=E124,E125,E127,E128,E225,E226,E241,E251,E302,E501,E203,E221,E231,E261,F401,F403,W601
    88
    99[metadata]
    1010license-file = LICENSE
  • tests/forms_tests/tests/test_extra.py

    diff --git a/tests/forms_tests/tests/test_extra.py b/tests/forms_tests/tests/test_extra.py
    index f32c764..01bb1b0 100644
    a b class FormsExtraTestCase(TestCase, AssertFormErrorsMixin):  
    658658            if six.PY3:
    659659                def __str__(self):
    660660                    return 'ŠĐĆŽćžšđ'
     661
    661662                def __bytes__(self):
    662663                    return b'Foo'
    663664            else:
    664665                def __str__(self):
    665666                    return b'Foo'
     667
    666668                def __unicode__(self):
    667669                    return '\u0160\u0110\u0106\u017d\u0107\u017e\u0161\u0111'
    668670
  • tests/migrations/test_operations.py

    diff --git a/tests/migrations/test_operations.py b/tests/migrations/test_operations.py
    index aae1a14..903c0a1 100644
    a b class OperationTests(MigrationTestBase):  
    346346        # And test reversal fails
    347347        with self.assertRaises(NotImplementedError):
    348348            operation.database_backwards("test_runpython", None, new_state, project_state)
     349
    349350        # Now test we can do it with a callable
    350351        def inner_method(models, schema_editor):
    351352            Pony = models.get_model("test_runpython", "Pony")
  • tests/migrations/test_state.py

    diff --git a/tests/migrations/test_state.py b/tests/migrations/test_state.py
    index 7c6e7a2..4823f28 100644
    a b class StateTests(TestCase):  
    2020            name = models.CharField(max_length=255)
    2121            bio = models.TextField()
    2222            age = models.IntegerField(blank=True, null=True)
     23
    2324            class Meta:
    2425                app_label = "migrations"
    2526                app_cache = new_app_cache
    class StateTests(TestCase):  
    3536        class Book(models.Model):
    3637            title = models.CharField(max_length=1000)
    3738            author = models.ForeignKey(Author)
     39
    3840            class Meta:
    3941                app_label = "migrations"
    4042                app_cache = new_app_cache
  • tests/tablespaces/models.py

    diff --git a/tests/tablespaces/models.py b/tests/tablespaces/models.py
    index 98ec688..d5d1793 100644
    a b class ArticleRef(models.Model):  
    1818
    1919class Scientist(models.Model):
    2020    name = models.CharField(max_length=50)
     21
    2122    class Meta:
    2223        db_table = 'tablespaces_scientistref'
    2324        db_tablespace = 'tbl_tbsp'
    class Article(models.Model):  
    2829    code = models.CharField(max_length=50, unique=True, db_tablespace='idx_tbsp')
    2930    authors = models.ManyToManyField(Scientist, related_name='articles_written_set')
    3031    reviewers = models.ManyToManyField(Scientist, related_name='articles_reviewed_set', db_tablespace='idx_tbsp')
     32
    3133    class Meta:
    3234        db_table = 'tablespaces_articleref'
    3335        db_tablespace = 'tbl_tbsp'
Back to Top