summaryrefslogtreecommitdiff
path: root/tests/unittests/test_handler
diff options
context:
space:
mode:
authorParide Legovini <paride.legovini@canonical.com>2021-09-21 22:28:30 +0200
committerGitHub <noreply@github.com>2021-09-21 15:28:30 -0500
commit089a307db1fc572461eea1589f1876132c058311 (patch)
tree9d2c32e4e56bf06a4d62a570691730a0d73b8e41 /tests/unittests/test_handler
parente27c30748e88409b1646a552f994edf9ed9d017e (diff)
downloadvyos-cloud-init-089a307db1fc572461eea1589f1876132c058311.tar.gz
vyos-cloud-init-089a307db1fc572461eea1589f1876132c058311.zip
tox: bump the pinned flake8 and pylint version (#1029)
tox: bump the pinned flake8 and pylint version * pylint: fix W1406 (redundant-u-string-prefix) The u prefix for strings is no longer necessary in Python >=3.0. * pylint: disable W1514 (unspecified-encoding) From https://www.python.org/dev/peps/pep-0597/ (Python 3.10): The new warning stems form https://www.python.org/dev/peps/pep-0597, which says: Developers using macOS or Linux may forget that the default encoding is not always UTF-8. [...] Even Python experts may assume that the default encoding is UTF-8. This creates bugs that only happen on Windows. The warning could be fixed by always specifying encoding='utf-8', however we should be careful to not break environments which are not utf-8 (or explicitly state that only utf-8 is supported). Let's silence the warning for now. * _quick_read_instance_id: cover the case where load_yaml() returns None Spotted by pylint: - E1135 (unsupported-membership-test) - E1136 (unsubscriptable-object) LP: #1944414
Diffstat (limited to 'tests/unittests/test_handler')
-rw-r--r--tests/unittests/test_handler/test_handler_apt_source_v3.py2
-rw-r--r--tests/unittests/test_handler/test_handler_debug.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/unittests/test_handler/test_handler_apt_source_v3.py b/tests/unittests/test_handler/test_handler_apt_source_v3.py
index abb0a9b6..687cfbf1 100644
--- a/tests/unittests/test_handler/test_handler_apt_source_v3.py
+++ b/tests/unittests/test_handler/test_handler_apt_source_v3.py
@@ -26,7 +26,7 @@ from cloudinit.sources import DataSourceNone
from cloudinit.tests import helpers as t_help
-EXPECTEDKEY = u"""-----BEGIN PGP PUBLIC KEY BLOCK-----
+EXPECTEDKEY = """-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mI0ESuZLUgEEAKkqq3idtFP7g9hzOu1a8+v8ImawQN4TrvlygfScMU1TIS1eC7UQ
diff --git a/tests/unittests/test_handler/test_handler_debug.py b/tests/unittests/test_handler/test_handler_debug.py
index 787ba350..7d43e020 100644
--- a/tests/unittests/test_handler/test_handler_debug.py
+++ b/tests/unittests/test_handler/test_handler_debug.py
@@ -41,7 +41,7 @@ class TestDebug(FilesystemMockingTestCase):
m_locale.return_value = 'en_US.UTF-8'
cfg = {
'abc': '123',
- 'c': u'\u20a0',
+ 'c': '\u20a0',
'debug': {
'verbose': True,
# Does not actually write here due to mocking...