diff --git a/yamllint/cli.py b/yamllint/cli.py index ea0d704..0ceed35 100644 --- a/yamllint/cli.py +++ b/yamllint/cli.py @@ -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' % diff --git a/yamllint/linter.py b/yamllint/linter.py index a50298a..d250598 100644 --- a/yamllint/linter.py +++ b/yamllint/linter.py @@ -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='', rule=None): #: Line on which the problem was found (starting at 1) diff --git a/yamllint/rules/key_ordering.py b/yamllint/rules/key_ordering.py index ddbc24f..ad38ed7 100644 --- a/yamllint/rules/key_ordering.py +++ b/yamllint/rules/key_ordering.py @@ -93,7 +93,7 @@ TYPE = 'token' MAP, SEQ = range(2) -class Parent(object): +class Parent: def __init__(self, type): self.type = type self.keys = []