No need to inherit from object in Python 3
This commit is contained in:
committed by
Adrien Vergé
parent
4d271f3daf
commit
47cd8f2e9e
@@ -47,7 +47,7 @@ def supports_color():
|
|||||||
hasattr(sys.stdout, 'isatty') and sys.stdout.isatty())
|
hasattr(sys.stdout, 'isatty') and sys.stdout.isatty())
|
||||||
|
|
||||||
|
|
||||||
class Format(object):
|
class Format:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def parsable(problem, filename):
|
def parsable(problem, filename):
|
||||||
return ('%(file)s:%(line)s:%(column)s: [%(level)s] %(message)s' %
|
return ('%(file)s:%(line)s:%(column)s: [%(level)s] %(message)s' %
|
||||||
|
|||||||
@@ -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*$')
|
ENABLE_RULE_PATTERN = re.compile(r'^# yamllint enable( rule:\S+)*\s*$')
|
||||||
|
|
||||||
|
|
||||||
class LintProblem(object):
|
class LintProblem:
|
||||||
"""Represents a linting problem found by yamllint."""
|
"""Represents a linting problem found by yamllint."""
|
||||||
def __init__(self, line, column, desc='<no description>', rule=None):
|
def __init__(self, line, column, desc='<no description>', rule=None):
|
||||||
#: Line on which the problem was found (starting at 1)
|
#: Line on which the problem was found (starting at 1)
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ TYPE = 'token'
|
|||||||
MAP, SEQ = range(2)
|
MAP, SEQ = range(2)
|
||||||
|
|
||||||
|
|
||||||
class Parent(object):
|
class Parent:
|
||||||
def __init__(self, type):
|
def __init__(self, type):
|
||||||
self.type = type
|
self.type = type
|
||||||
self.keys = []
|
self.keys = []
|
||||||
|
|||||||
Reference in New Issue
Block a user