diff options
author | Anthony Sottile <asottile@umich.edu> | 2020-03-19 11:20:05 -0700 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2020-03-24 10:27:21 +0100 |
commit | a45505143f89718073b7d06c99d09c05cd0e4108 (patch) | |
tree | b5be3d9c6f8a29ec08af5147702c0f99eb549ebc /tests/utils | |
parent | 63bf9dcf39a7dbd86601ef6c6a16eef4768f1e9a (diff) | |
download | pylint-git-a45505143f89718073b7d06c99d09c05cd0e4108.tar.gz |
pyupgrade: automated removal of python2 constructs
using configuration:
```yaml
- repo: https://github.com/asottile/pyupgrade
rev: v2.1.0
hooks:
- id: pyupgrade
args: [--py3-plus, --keep-percent-format]
exclude: ^tests/(extensions/data/|functional/|input/|regrtest_data/)
```
Diffstat (limited to 'tests/utils')
-rw-r--r-- | tests/utils/unittest_ast_walker.py | 10 | ||||
-rw-r--r-- | tests/utils/unittest_utils.py | 1 |
2 files changed, 4 insertions, 7 deletions
diff --git a/tests/utils/unittest_ast_walker.py b/tests/utils/unittest_ast_walker.py index b8fb78eac..6f51d1781 100644 --- a/tests/utils/unittest_ast_walker.py +++ b/tests/utils/unittest_ast_walker.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - # Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html # For details: https://github.com/PyCQA/pylint/blob/master/COPYING @@ -11,15 +9,15 @@ from pylint.checkers.utils import check_messages from pylint.utils import ASTWalker -class TestASTWalker(object): - class MockLinter(object): +class TestASTWalker: + class MockLinter: def __init__(self, msgs): self._msgs = msgs def is_message_enabled(self, msgid): return self._msgs.get(msgid, True) - class Checker(object): + class Checker: def __init__(self): self.called = set() @@ -50,7 +48,7 @@ class TestASTWalker(object): assert {"module", "assignname"} == checker.called def test_deprecated_methods(self): - class Checker(object): + class Checker: def __init__(self): self.called = False diff --git a/tests/utils/unittest_utils.py b/tests/utils/unittest_utils.py index a009391de..387ee21b5 100644 --- a/tests/utils/unittest_utils.py +++ b/tests/utils/unittest_utils.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2013-2014 Google, Inc. # Copyright (c) 2013-2014 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr> # Copyright (c) 2014 Arun Persaud <arun@nubati.net> |