Fix PEP8 block comment issues (E265)
parent
aaf06c71a5
commit
b7431b2d06
|
|
@ -22,7 +22,7 @@ def show_queries():
|
|||
import time
|
||||
|
||||
###################################################################################
|
||||
### benchmark wrappers
|
||||
# benchmark wrappers
|
||||
|
||||
|
||||
def print_timing(func, message='', iterations=1):
|
||||
|
|
@ -54,7 +54,7 @@ def run_vanilla_any_poly(func, iterations=1):
|
|||
|
||||
|
||||
###################################################################################
|
||||
### benchmarks
|
||||
# benchmarks
|
||||
|
||||
def bench_create(model):
|
||||
for i in xrange(num_objects):
|
||||
|
|
@ -92,7 +92,7 @@ def bench_delete(model):
|
|||
model.objects.all().delete()
|
||||
|
||||
###################################################################################
|
||||
### Command
|
||||
# Command
|
||||
|
||||
|
||||
class Command(NoArgsCommand):
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ except ImportError:
|
|||
|
||||
|
||||
###################################################################################
|
||||
### PolymorphicModel meta class
|
||||
# PolymorphicModel meta class
|
||||
|
||||
class PolymorphicModelBase(ModelBase):
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ from .manager import PolymorphicManager
|
|||
from .query_translate import translate_polymorphic_Q_object
|
||||
|
||||
###################################################################################
|
||||
### PolymorphicModel
|
||||
# PolymorphicModel
|
||||
|
||||
|
||||
class PolymorphicModel(six.with_metaclass(PolymorphicModelBase, models.Model)):
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ def transmogrify(cls, obj):
|
|||
|
||||
|
||||
###################################################################################
|
||||
### PolymorphicQuerySet
|
||||
# PolymorphicQuerySet
|
||||
|
||||
def _query_annotations(query):
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ from functools import reduce
|
|||
|
||||
|
||||
###################################################################################
|
||||
### PolymorphicQuerySet support functions
|
||||
# PolymorphicQuerySet support functions
|
||||
|
||||
# These functions implement the additional filter- and Q-object functionality.
|
||||
# They form a kind of small framework for easily adding more
|
||||
|
|
|
|||
|
|
@ -929,7 +929,7 @@ class PolymorphicTests(TestCase):
|
|||
self.assertEqual(repr(qs[1]), '<CustomPkInherit: id 2, b (CharField) "b", custom_id (AutoField/pk) 1, i (CharField) "i">')
|
||||
|
||||
def test_fix_getattribute(self):
|
||||
### fixed issue in PolymorphicModel.__getattribute__: field name same as model name
|
||||
# fixed issue in PolymorphicModel.__getattribute__: field name same as model name
|
||||
o = ModelFieldNameTest.objects.create(modelfieldnametest='1')
|
||||
self.assertEqual(repr(o), '<ModelFieldNameTest: id 1, modelfieldnametest (CharField)>')
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue