mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-09 14:24:17 +00:00
Add broken config file to test error handling
ConfigFileFinder should absolutely handle broken/invalid config files by refusing to try to parse them. Here we catch the ParsingError, log the exception, and then return normally. The RawConfigParser instance is perfectly valid still and will behave as if nothing had been read and we just need to indicate that we didn't find any files worthy of reading. Related to: https://github.com/PyCQA/pycodestyle/issues/506
This commit is contained in:
parent
9a9bcdfb52
commit
3f434f7d1c
3 changed files with 26 additions and 1 deletions
9
tests/fixtures/config_files/broken.ini
vendored
Normal file
9
tests/fixtures/config_files/broken.ini
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
[flake8]
|
||||
exclude =
|
||||
<<<<<<< 642f88cb1b6027e184d9a662b255f7fea4d9eacc
|
||||
tests/fixtures/,
|
||||
=======
|
||||
tests/,
|
||||
>>>>>>> HEAD
|
||||
docs/
|
||||
ignore = D203
|
||||
Loading…
Add table
Add a link
Reference in a new issue