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>
This commit is contained in:
Sebastian Müller 2021-04-10 14:29:08 +02:00 committed by GitHub
parent 316fc0dcbb
commit ac02be7686
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 1 deletions

View File

@ -468,3 +468,5 @@ contributors:
* James Sinclair (irgeek): contributor
* Andreas Finkler: contributor
* Sebastian Müller: contributor

View File

@ -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

View File

@ -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())