No need to inherit from object in Python 3

This commit is contained in:
Dimitri Papadopoulos 2022-10-15 22:32:20 +02:00 committed by Adrien Vergé
parent 4d271f3daf
commit 47cd8f2e9e
3 changed files with 3 additions and 3 deletions

View File

@ -47,7 +47,7 @@ def supports_color():
hasattr(sys.stdout, 'isatty') and sys.stdout.isatty())
class Format(object):
class Format:
@staticmethod
def parsable(problem, filename):
return ('%(file)s:%(line)s:%(column)s: [%(level)s] %(message)s' %

View File

@ -34,7 +34,7 @@ DISABLE_RULE_PATTERN = re.compile(r'^# yamllint disable( rule:\S+)*\s*$')
ENABLE_RULE_PATTERN = re.compile(r'^# yamllint enable( rule:\S+)*\s*$')
class LintProblem(object):
class LintProblem:
"""Represents a linting problem found by yamllint."""
def __init__(self, line, column, desc='<no description>', rule=None):
#: Line on which the problem was found (starting at 1)

View File

@ -93,7 +93,7 @@ TYPE = 'token'
MAP, SEQ = range(2)
class Parent(object):
class Parent:
def __init__(self, type):
self.type = type
self.keys = []