diff options
author | Mark Byrne <31762852+mbyrnepr2@users.noreply.github.com> | 2022-08-18 22:13:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-18 22:13:23 +0200 |
commit | 82d55aee4ae3718b77fbec70e5d7d80c70adfa27 (patch) | |
tree | b8947faffa21e7401d176cc822ffe75191a18576 /tests/regrtest_data | |
parent | a2c57ec06070b6d2485082e3a131a087f8d6d921 (diff) | |
download | pylint-git-82d55aee4ae3718b77fbec70e5d7d80c70adfa27.tar.gz |
Remove Python 2 code from the tests & refactor (#7320)
- Refactor Classes which inherit from `object`.
- Remove `import print_function from __future__`.
- Remove assignments to `__revision__` from the functional test module when it is never used throughout the module.
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Diffstat (limited to 'tests/regrtest_data')
-rw-r--r-- | tests/regrtest_data/classdoc_usage.py | 3 | ||||
-rw-r--r-- | tests/regrtest_data/func_block_disable_msg.py | 6 |
2 files changed, 4 insertions, 5 deletions
diff --git a/tests/regrtest_data/classdoc_usage.py b/tests/regrtest_data/classdoc_usage.py index 2d9df51cd..b12bafa72 100644 --- a/tests/regrtest_data/classdoc_usage.py +++ b/tests/regrtest_data/classdoc_usage.py @@ -1,9 +1,8 @@ """ds""" __revision__ = None -# pylint: disable=useless-object-inheritance -class SomeClass(object): +class SomeClass: """cds""" doc = __doc__ diff --git a/tests/regrtest_data/func_block_disable_msg.py b/tests/regrtest_data/func_block_disable_msg.py index 8a94ab4f3..a1dd9a627 100644 --- a/tests/regrtest_data/func_block_disable_msg.py +++ b/tests/regrtest_data/func_block_disable_msg.py @@ -1,8 +1,8 @@ -# pylint: disable=C0302,bare-except, useless-object-inheritance +# pylint: disable=C0302,bare-except """pylint option block-disable""" from __future__ import print_function -class Foo(object): +class Foo: """block-disable test""" def __init__(self): @@ -110,7 +110,7 @@ class Foo(object): print(self.blu) -class ClassLevelMessage(object): +class ClassLevelMessage: """shouldn't display to much attributes/not enough methods messages """ # pylint: disable=R0902,R0903 |