From 97d258c6e593e8858afe552e529ce5e7c49790a1 Mon Sep 17 00:00:00 2001 From: Stanislav Levin Date: Fri, 18 Feb 2022 11:26:29 +0300 Subject: [PATCH] pylint: Skip unspecified-encoding Pylint 2.10 introduced new checker: > It is better to specify an encoding when opening documents. Using the system default implicitly can create problems on other operating systems. See https://www.python.org/dev/peps/pep-0597/ According to that PEP: > open(filename) isn't explicit about which encoding is expected: - If ASCII is assumed, this isn't a bug, but may result in decreased performance on Windows, particularly with non-Latin-1 locale encodings - If UTF-8 is assumed, this may be a bug or a platform-specific script - If the locale encoding is assumed, the behavior is as expected (but could change if future versions of Python modify the default) IPA requires UTF-8 environments. Fixes: https://pagure.io/freeipa/issue/9117 Signed-off-by: Stanislav Levin Reviewed-By: Rob Crittenden --- pylintrc | 1 + 1 file changed, 1 insertion(+) diff --git a/pylintrc b/pylintrc index b0e5fe61c..98a46324a 100644 --- a/pylintrc +++ b/pylintrc @@ -112,6 +112,7 @@ disable= consider-using-f-string, # pylint 2.11.0, format can be more readable use-dict-literal, # pylint 2.10.0 dict vs {} use-list-literal, # pylint 2.10.0 list() vs [] + unspecified-encoding, # pylint 2.10.0, ASCII or UTF8 and platform-specific [REPORTS]