kopia lustrzana https://github.com/wagtail/wagtail
Stopped inheriting from object.
rodzic
33204be105
commit
0938c8e0c0
|
@ -5,7 +5,7 @@ import string
|
|||
ALPHANUM = string.ascii_lowercase + string.digits
|
||||
|
||||
|
||||
class Block(object):
|
||||
class Block:
|
||||
def __init__(self, typ, depth=0):
|
||||
self.type = typ
|
||||
self.depth = depth
|
||||
|
@ -25,7 +25,7 @@ class Block(object):
|
|||
}
|
||||
|
||||
|
||||
class InlineStyleRange(object):
|
||||
class InlineStyleRange:
|
||||
def __init__(self, style):
|
||||
self.style = style
|
||||
self.offset = None
|
||||
|
@ -39,7 +39,7 @@ class InlineStyleRange(object):
|
|||
}
|
||||
|
||||
|
||||
class Entity(object):
|
||||
class Entity:
|
||||
def __init__(self, entity_type, mutability, data):
|
||||
self.entity_type = entity_type
|
||||
self.mutability = mutability
|
||||
|
@ -53,7 +53,7 @@ class Entity(object):
|
|||
}
|
||||
|
||||
|
||||
class EntityRange(object):
|
||||
class EntityRange:
|
||||
def __init__(self, key):
|
||||
self.key = key
|
||||
self.offset = None
|
||||
|
@ -67,7 +67,7 @@ class EntityRange(object):
|
|||
}
|
||||
|
||||
|
||||
class ContentState(object):
|
||||
class ContentState:
|
||||
"""Pythonic representation of a draft.js contentState structure"""
|
||||
def __init__(self):
|
||||
self.blocks = []
|
||||
|
|
|
@ -7,7 +7,7 @@ from wagtail.core.models import Page
|
|||
from wagtail.search.backends import get_search_backend
|
||||
|
||||
|
||||
class PageSearchTests(object):
|
||||
class PageSearchTests:
|
||||
# A TestCase with this class mixed in will be dynamically created
|
||||
# for each search backend defined in WAGTAILSEARCH_BACKENDS, with the backend name available
|
||||
# as self.backend_name
|
||||
|
|
|
@ -13,7 +13,7 @@ class RemovedInWagtail29Warning(PendingDeprecationWarning):
|
|||
pass
|
||||
|
||||
|
||||
class MovedDefinitionHandler(object):
|
||||
class MovedDefinitionHandler:
|
||||
"""
|
||||
A wrapper for module objects to enable definitions to be moved to a new module, with a
|
||||
deprecation path for the old location. Importing the name from the old location will
|
||||
|
|
|
@ -8,7 +8,7 @@ from copy import copy, deepcopy
|
|||
import six
|
||||
|
||||
|
||||
class Trans(object):
|
||||
class Trans:
|
||||
|
||||
def __init__(self):
|
||||
self.registry = {}
|
||||
|
@ -73,7 +73,7 @@ else:
|
|||
return s
|
||||
|
||||
|
||||
class L18NLazyObject(object):
|
||||
class L18NLazyObject:
|
||||
|
||||
def _value(self, utf8=True):
|
||||
raise NotImplementedError
|
||||
|
|
Ładowanie…
Reference in New Issue