From d99c059cb0eae4d720a2d48fb39acf6e93bc0b0e Mon Sep 17 00:00:00 2001 From: Tomas Fratrik Date: Wed, 13 Aug 2025 13:19:58 +0200 Subject: [PATCH 35/55] pylint: enable redundant-u-string-prefix Jira: RHELMISC-16038 --- .pylintrc | 1 - .../common/actors/rootscanner/tests/test_rootscanner.py | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.pylintrc b/.pylintrc index bc051513..7d938715 100644 --- a/.pylintrc +++ b/.pylintrc @@ -52,7 +52,6 @@ disable= raise-missing-from, # no 'raise from' in python 2 use-a-generator, # cannot be modified because of Python2 support consider-using-f-string, # sorry, not gonna happen, still have to support py2 - redundant-u-string-prefix, # still have py2 to support logging-format-interpolation, logging-not-lazy, use-yield-from # yield from cannot be used until we require python 3.3 or greater diff --git a/repos/system_upgrade/common/actors/rootscanner/tests/test_rootscanner.py b/repos/system_upgrade/common/actors/rootscanner/tests/test_rootscanner.py index 659a3017..07ce5da8 100644 --- a/repos/system_upgrade/common/actors/rootscanner/tests/test_rootscanner.py +++ b/repos/system_upgrade/common/actors/rootscanner/tests/test_rootscanner.py @@ -9,9 +9,9 @@ from leapp.libraries.actor.rootscanner import scan_dir @pytest.mark.parametrize("filename,symlink,count_invalid", - [(u'a_utf_file'.encode('utf-8'), u"utf8_symlink".encode('utf-8'), 0), - (u'простофайл'.encode('koi8-r'), u"этонеутф8".encode('koi8-r'), 2), - (u'a_utf_file'.encode('utf-8'), u"этонеутф8".encode('koi8-r'), 1)]) + [('a_utf_file'.encode('utf-8'), "utf8_symlink".encode('utf-8'), 0), + ('простофайл'.encode('koi8-r'), "этонеутф8".encode('koi8-r'), 2), + ('a_utf_file'.encode('utf-8'), "этонеутф8".encode('koi8-r'), 1)]) def test_invalid_symlinks(filename, symlink, count_invalid): # Let's create a directory with both valid utf-8 and non-utf symlinks # NOTE(ivasilev) As this has to run for python2 as well can't use the nice tempfile.TemporaryDirectory way -- 2.51.1