Skip to content

Commit

Permalink
Force encoding in reading of setup.cfg to utf-8 (#4329)
Browse files Browse the repository at this point in the history
* Add Sebastian Müller to contributors
* Add setup.cfg utf8 fix to changelog

Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
  • Loading branch information
MuellerSeb and Pierre-Sassoulas committed Apr 10, 2021
1 parent 316fc0d commit ac02be7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -468,3 +468,5 @@ contributors:
* James Sinclair (irgeek): contributor

* Andreas Finkler: contributor

* Sebastian Müller: contributor
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pylint/config/find_default_config_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())


Expand Down

0 comments on commit ac02be7

Please sign in to comment.