Skip to content

Commit

Permalink
No need to inherit from object in Python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitriPapadopoulos authored and adrienverge committed Aug 5, 2022
1 parent 4c7b47d commit ae3158c
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from yamllint import config


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

def __init__(self, case):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def test_enable_disable_keywords(self):
self.assertEqual(c.rules['hyphens'], False)

def test_validate_rule_conf(self):
class Rule(object):
class Rule:
ID = 'fake'

self.assertFalse(config.validate_rule_conf(Rule, False))
Expand Down
2 changes: 1 addition & 1 deletion yamllint/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class YamlLintConfigError(Exception):
pass


class YamlLintConfig(object):
class YamlLintConfig:
def __init__(self, content=None, file=None):
assert (content is None) ^ (file is None)

Expand Down
6 changes: 3 additions & 3 deletions yamllint/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import yaml


class Line(object):
class Line:
def __init__(self, line_no, buffer, start, end):
self.line_no = line_no
self.start = start
Expand All @@ -28,7 +28,7 @@ def content(self):
return self.buffer[self.start:self.end]


class Token(object):
class Token:
def __init__(self, line_no, curr, prev, next, nextnext):
self.line_no = line_no
self.curr = curr
Expand All @@ -37,7 +37,7 @@ def __init__(self, line_no, curr, prev, next, nextnext):
self.nextnext = nextnext


class Comment(object):
class Comment:
def __init__(self, line_no, column_no, buffer, pointer,
token_before=None, token_after=None, comment_before=None):
self.line_no = line_no
Expand Down
2 changes: 1 addition & 1 deletion yamllint/rules/indentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
labels = ('ROOT', 'B_MAP', 'F_MAP', 'B_SEQ', 'F_SEQ', 'B_ENT', 'KEY', 'VAL')


class Parent(object):
class Parent:
def __init__(self, type, indent, line_indent=None):
self.type = type
self.indent = indent
Expand Down
2 changes: 1 addition & 1 deletion yamllint/rules/key_duplicates.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
MAP, SEQ = range(2)


class Parent(object):
class Parent:
def __init__(self, type):
self.type = type
self.keys = []
Expand Down

0 comments on commit ae3158c

Please sign in to comment.