diff options
author | Sebastian Müller <mueller.seb@posteo.de> | 2021-04-10 14:29:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-10 14:29:08 +0200 |
commit | ac02be7686bd928729f843e08421fb63e1c38d4b (patch) | |
tree | fe1ac8e8ca6e8e3baec97aa28e0231fb885f0fa3 | |
parent | 316fc0dcbb37d8072df82aaa90048f5ad43e4ce3 (diff) | |
download | pylint-git-ac02be7686bd928729f843e08421fb63e1c38d4b.tar.gz |
Force encoding in reading of setup.cfg to utf-8 (#4329)
* Add Sebastian Müller to contributors
* Add setup.cfg utf8 fix to changelog
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
-rw-r--r-- | CONTRIBUTORS.txt | 2 | ||||
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | pylint/config/find_default_config_files.py | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index c6162a235..e95ae4529 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -468,3 +468,5 @@ contributors: * James Sinclair (irgeek): contributor * Andreas Finkler: contributor + +* Sebastian Müller: contributor @@ -67,6 +67,10 @@ Release date: Undefined * Don't show ``DuplicateBasesError`` for attribute access +* Fix crash when checking ``setup.cfg`` for pylint config when there are non-ascii characters in there + + Closes #4328 + * Allow code flanked in backticks to be skipped by spellchecker Closes #4319 diff --git a/pylint/config/find_default_config_files.py b/pylint/config/find_default_config_files.py index 126ac4a1e..b1457a892 100644 --- a/pylint/config/find_default_config_files.py +++ b/pylint/config/find_default_config_files.py @@ -26,7 +26,7 @@ def _toml_has_config(path): def _cfg_has_config(path): parser = configparser.ConfigParser() - parser.read(path) + parser.read(path, encoding="utf-8") return any(section.startswith("pylint.") for section in parser.sections()) |