Skip to content

Commit ac02be7

Browse files
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 <[email protected]>
1 parent 316fc0d commit ac02be7

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

CONTRIBUTORS.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,3 +468,5 @@ contributors:
468468
* James Sinclair (irgeek): contributor
469469

470470
* Andreas Finkler: contributor
471+
472+
* Sebastian Müller: contributor

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ Release date: Undefined
6767

6868
* Don't show ``DuplicateBasesError`` for attribute access
6969

70+
* Fix crash when checking ``setup.cfg`` for pylint config when there are non-ascii characters in there
71+
72+
Closes #4328
73+
7074
* Allow code flanked in backticks to be skipped by spellchecker
7175

7276
Closes #4319

pylint/config/find_default_config_files.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def _toml_has_config(path):
2626

2727
def _cfg_has_config(path):
2828
parser = configparser.ConfigParser()
29-
parser.read(path)
29+
parser.read(path, encoding="utf-8")
3030
return any(section.startswith("pylint.") for section in parser.sections())
3131

3232

0 commit comments

Comments
 (0)