mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Refs #23919 -- Stopped inheriting from object to define new style classes.
This commit is contained in:
parent
a556396339
commit
cecc079168
293 changed files with 512 additions and 514 deletions
|
@ -11,7 +11,7 @@ class FunctionalTestCase(unittest.TestCase):
|
|||
|
||||
def test_lazy_base_class(self):
|
||||
"""lazy also finds base class methods in the proxy object"""
|
||||
class Base(object):
|
||||
class Base:
|
||||
def base_method(self):
|
||||
pass
|
||||
|
||||
|
@ -23,7 +23,7 @@ class FunctionalTestCase(unittest.TestCase):
|
|||
|
||||
def test_lazy_base_class_override(self):
|
||||
"""lazy finds the correct (overridden) method implementation"""
|
||||
class Base(object):
|
||||
class Base:
|
||||
def method(self):
|
||||
return 'Base'
|
||||
|
||||
|
@ -36,7 +36,7 @@ class FunctionalTestCase(unittest.TestCase):
|
|||
|
||||
def test_lazy_object_to_string(self):
|
||||
|
||||
class Klazz(object):
|
||||
class Klazz:
|
||||
def __str__(self):
|
||||
return "Î am ā Ǩlâzz."
|
||||
|
||||
|
@ -51,7 +51,7 @@ class FunctionalTestCase(unittest.TestCase):
|
|||
"""
|
||||
cached_property caches its value and that it behaves like a property
|
||||
"""
|
||||
class A(object):
|
||||
class A:
|
||||
|
||||
@cached_property
|
||||
def value(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue