Ticket #21298: E301.diff
File E301.diff, 4.7 KB (added by , 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): 101 101 # data is going to be stored eventually by SimpleCookie, which 102 102 # adds it's own overhead, which we must account for. 103 103 cookie = SimpleCookie() # create outside the loop 104 104 105 def stored_length(val): 105 106 return len(cookie.value_encode(val)[1]) 106 107 -
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): 118 118 HTMLParser.__init__(self) 119 119 self.reset() 120 120 self.fed = [] 121 121 122 def handle_data(self, d): 122 123 self.fed.append(d) 124 123 125 def handle_entityref(self, name): 124 126 self.fed.append('&%s;' % name) 127 125 128 def handle_charref(self, name): 126 129 self.fed.append('&#%s;' % name) 130 127 131 def get_data(self): 128 132 return ''.join(self.fed) 129 133 -
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 3 3 install-script = scripts/rpm-install.sh 4 4 5 5 [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,W6016 exclude=./django/utils/dictconfig.py,./django/contrib/comments/*,./django/utils/unittest.py,./tests/comment_tests/*,./django/test/_doctest.py,./django/utils/six.py 7 ignore=E124,E125,E127,E128,E225,E226,E241,E251,E302,E501,E203,E221,E231,E261,F401,F403,W601 8 8 9 9 [metadata] 10 10 license-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): 658 658 if six.PY3: 659 659 def __str__(self): 660 660 return 'ŠĐĆŽćžšđ' 661 661 662 def __bytes__(self): 662 663 return b'Foo' 663 664 else: 664 665 def __str__(self): 665 666 return b'Foo' 667 666 668 def __unicode__(self): 667 669 return '\u0160\u0110\u0106\u017d\u0107\u017e\u0161\u0111' 668 670 -
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): 346 346 # And test reversal fails 347 347 with self.assertRaises(NotImplementedError): 348 348 operation.database_backwards("test_runpython", None, new_state, project_state) 349 349 350 # Now test we can do it with a callable 350 351 def inner_method(models, schema_editor): 351 352 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): 20 20 name = models.CharField(max_length=255) 21 21 bio = models.TextField() 22 22 age = models.IntegerField(blank=True, null=True) 23 23 24 class Meta: 24 25 app_label = "migrations" 25 26 app_cache = new_app_cache … … class StateTests(TestCase): 35 36 class Book(models.Model): 36 37 title = models.CharField(max_length=1000) 37 38 author = models.ForeignKey(Author) 39 38 40 class Meta: 39 41 app_label = "migrations" 40 42 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): 18 18 19 19 class Scientist(models.Model): 20 20 name = models.CharField(max_length=50) 21 21 22 class Meta: 22 23 db_table = 'tablespaces_scientistref' 23 24 db_tablespace = 'tbl_tbsp' … … class Article(models.Model): 28 29 code = models.CharField(max_length=50, unique=True, db_tablespace='idx_tbsp') 29 30 authors = models.ManyToManyField(Scientist, related_name='articles_written_set') 30 31 reviewers = models.ManyToManyField(Scientist, related_name='articles_reviewed_set', db_tablespace='idx_tbsp') 32 31 33 class Meta: 32 34 db_table = 'tablespaces_articleref' 33 35 db_tablespace = 'tbl_tbsp'