From 249e64a64dde382efc904e7af6db420f4d9ccca1 Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Mon, 16 Aug 2021 16:04:29 +0530 Subject: [PATCH] sanity fixes for pylint test Signed-off-by: Abhijeet Kasurde --- changelogs/fragments/sanity_fixes.yml | 3 +++ tests/sanity/ignore-2.12.txt | 2 +- tests/unit/mock/loader.py | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/sanity_fixes.yml diff --git a/changelogs/fragments/sanity_fixes.yml b/changelogs/fragments/sanity_fixes.yml new file mode 100644 index 0000000000..4920b88ffa --- /dev/null +++ b/changelogs/fragments/sanity_fixes.yml @@ -0,0 +1,3 @@ +--- +trivial: +- sanity fixes for pylint test. diff --git a/tests/sanity/ignore-2.12.txt b/tests/sanity/ignore-2.12.txt index 013403fe1d..0b6905e1c9 100644 --- a/tests/sanity/ignore-2.12.txt +++ b/tests/sanity/ignore-2.12.txt @@ -1,4 +1,4 @@ -plugins/modules/synchronize.py pylint:blacklisted-name +plugins/modules/synchronize.py pylint:disallowed-name plugins/modules/synchronize.py use-argspec-type-path plugins/modules/synchronize.py validate-modules:doc-default-does-not-match-spec plugins/modules/synchronize.py validate-modules:nonexistent-parameter-documented diff --git a/tests/unit/mock/loader.py b/tests/unit/mock/loader.py index 0ee47fbb9f..e5dff78c1a 100644 --- a/tests/unit/mock/loader.py +++ b/tests/unit/mock/loader.py @@ -46,8 +46,8 @@ def load_from_file(self, path, cache=True, unsafe=False): # TODO: the real _get_file_contents returns a bytestring, so we actually convert the # unicode/text it's created with to utf-8 - def _get_file_contents(self, path): - path = to_text(path) + def _get_file_contents(self, file_name): + path = to_text(file_name) if path in self._file_mapping: return (to_bytes(self._file_mapping[path]), False) else: