diff options
| author | Jon Dufresne <jon.dufresne@gmail.com> | 2018-09-11 06:48:35 -0700 |
|---|---|---|
| committer | Jon Dufresne <jon.dufresne@gmail.com> | 2018-09-11 07:07:01 -0700 |
| commit | 490e4aed4145659dab000e86269bd7a3dc686318 (patch) | |
| tree | 87b32f22ae1ff41b03877a68bbb8ab4f1c2c9ab7 /tests/test_autodoc.py | |
| parent | 844a3a5c226ff8891a1ce139f10ac92157c75da5 (diff) | |
| download | sphinx-git-490e4aed4145659dab000e86269bd7a3dc686318.tar.gz | |
Remove unnecessary object from class definitions
In Python 3, all classes are new-style classes. The object in the
definition is redundant and unnecessary.
Diffstat (limited to 'tests/test_autodoc.py')
| -rw-r--r-- | tests/test_autodoc.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_autodoc.py b/tests/test_autodoc.py index 2699bb181..2681e7c48 100644 --- a/tests/test_autodoc.py +++ b/tests/test_autodoc.py @@ -216,7 +216,7 @@ def test_format_signature(): class D: pass - class E(object): + class E: pass # no signature for classes without __init__ for C in (D, E): @@ -226,7 +226,7 @@ def test_format_signature(): def __init__(self, a, b=None): pass - class G(F, object): + class G(F): pass for C in (F, G): assert formatsig('class', 'C', C, None, None) == '(a, b=None)' @@ -243,7 +243,7 @@ def test_format_signature(): some docstring for __init__. ''' - class G2(F2, object): + class G2(F2): pass assert formatsig('class', 'F2', F2, None, None) == \ @@ -399,7 +399,7 @@ def test_get_doc(): assert getdocl('class', E) == ['Class docstring', '', 'Init docstring'] # class does not have __init__ method - class F(object): + class F: """Class docstring""" # docstring in the __init__ method of base class will be discard @@ -413,7 +413,7 @@ def test_get_doc(): assert getdocl('class', F) == ['Class docstring'] # class has __init__ method with no docstring - class G(object): + class G: """Class docstring""" def __init__(self): pass |
