mirror of
https://github.com/adrienverge/yamllint.git
synced 2024-11-21 23:27:22 -06:00
No need to inherit from object
in Python 3
This commit is contained in:
parent
4d271f3daf
commit
47cd8f2e9e
@ -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' %
|
||||
|
@ -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)
|
||||
|
@ -93,7 +93,7 @@ TYPE = 'token'
|
||||
MAP, SEQ = range(2)
|
||||
|
||||
|
||||
class Parent(object):
|
||||
class Parent:
|
||||
def __init__(self, type):
|
||||
self.type = type
|
||||
self.keys = []
|
||||
|
Loading…
Reference in New Issue
Block a user