From 3e643724ce7ab3ad7c6007ce349223995b31eeb5 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Tue, 12 Sep 2023 10:32:29 +0200 Subject: [PATCH] tests: Apply pyupgrade suggestions * Simplify super() calls https://github.com/asottile/pyupgrade#super-calls * UTF-8 is the default for encode() https://github.com/asottile/pyupgrade#encodeutf-8 --- tests/test_cli.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index 419af920..241e0f4a 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -65,7 +65,7 @@ def utf8_available(): class CommandLineTestCase(unittest.TestCase): @classmethod def setUpClass(cls): - super(CommandLineTestCase, cls).setUpClass() + super().setUpClass() cls.wd = build_temp_workspace({ # .yaml file at root @@ -97,7 +97,7 @@ def setUpClass(cls): '- hétérogénéité\n' '# 19.99 €\n' '- お早う御座います。\n' - '# الأَبْجَدِيَّة العَرَبِيَّة\n').encode('utf-8'), + '# الأَبْجَدِيَّة العَرَبِيَّة\n').encode(), # dos line endings yaml 'dos.yml': '---\r\n' 'dos: true', @@ -112,7 +112,7 @@ def setUpClass(cls): @classmethod def tearDownClass(cls): - super(CommandLineTestCase, cls).tearDownClass() + super().tearDownClass() shutil.rmtree(cls.wd)