Skip to content

Commit ae3158c

Browse files
DimitriPapadopoulosadrienverge
authored andcommitted
No need to inherit from object in Python 3
1 parent 4c7b47d commit ae3158c

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

tests/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
from yamllint import config
3030

3131

32-
class RunContext(object):
32+
class RunContext:
3333
"""Context manager for ``cli.run()`` to capture exit code and streams."""
3434

3535
def __init__(self, case):

tests/test_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def test_enable_disable_keywords(self):
121121
self.assertEqual(c.rules['hyphens'], False)
122122

123123
def test_validate_rule_conf(self):
124-
class Rule(object):
124+
class Rule:
125125
ID = 'fake'
126126

127127
self.assertFalse(config.validate_rule_conf(Rule, False))

yamllint/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class YamlLintConfigError(Exception):
2525
pass
2626

2727

28-
class YamlLintConfig(object):
28+
class YamlLintConfig:
2929
def __init__(self, content=None, file=None):
3030
assert (content is None) ^ (file is None)
3131

yamllint/parser.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import yaml
1717

1818

19-
class Line(object):
19+
class Line:
2020
def __init__(self, line_no, buffer, start, end):
2121
self.line_no = line_no
2222
self.start = start
@@ -28,7 +28,7 @@ def content(self):
2828
return self.buffer[self.start:self.end]
2929

3030

31-
class Token(object):
31+
class Token:
3232
def __init__(self, line_no, curr, prev, next, nextnext):
3333
self.line_no = line_no
3434
self.curr = curr
@@ -37,7 +37,7 @@ def __init__(self, line_no, curr, prev, next, nextnext):
3737
self.nextnext = nextnext
3838

3939

40-
class Comment(object):
40+
class Comment:
4141
def __init__(self, line_no, column_no, buffer, pointer,
4242
token_before=None, token_after=None, comment_before=None):
4343
self.line_no = line_no

yamllint/rules/indentation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@
218218
labels = ('ROOT', 'B_MAP', 'F_MAP', 'B_SEQ', 'F_SEQ', 'B_ENT', 'KEY', 'VAL')
219219

220220

221-
class Parent(object):
221+
class Parent:
222222
def __init__(self, type, indent, line_indent=None):
223223
self.type = type
224224
self.indent = indent

yamllint/rules/key_duplicates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
MAP, SEQ = range(2)
6565

6666

67-
class Parent(object):
67+
class Parent:
6868
def __init__(self, type):
6969
self.type = type
7070
self.keys = []

0 commit comments

Comments
 (0)