One function
load_config in pycqa/flake8
The author described this change as “Raise exception if append-config does not exist”. It counts as a record because the check below fails on the code as it stood at ad1006e8c and passes on 314b9f516, with nothing else changed between the two runs.
Projectpycqa/flake8
Fix saved2022-11-08
Sharing licenceMIT · LICENSE
Change size+4 −1
What the code was meant to do, written into the code itself as a docstring
Load the configuration given the user options. - in `isolated` mode, return an empty configuration - if a config file is given in `config` use that, otherwise attempt to discover a configuration using `tox.ini` / `setup.cfg` / `.flake8` - finally, load any `extra` configuration files
The change
| 32 | 32 | # TODO: remove this and replace it with configuration modifying plugins | |
| 33 | 33 | # read the additional configs afterwards | |
| 34 | 34 | for filename in extra: | |
| 35 | - | cfg.read(filename, encoding="UTF-8") | |
| 35 | + | if not cfg.read(filename, encoding="UTF-8"): | |
| 36 | + | raise exceptions.ExecutionError( | |
| 37 | + | f"The specified config file does not exist: {filename}" | |
| 38 | + | ) | |
| 36 | 39 | ||
| 37 | 40 | return cfg, cfg_dir |
The check that tells the two apart
fail→pass·tests/unit/test_options_config.py::test_load_config_missing_append_config_raise_exception
Check file tests/unit/test_options_config.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before itad1006e8cb4494b496ae301a19d68d1565d06f8e
Broken version dated2022-11-07
Moduleflake8.options.config
Units changedload_config
Fingerprint5dec7bf131958e25
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.
Other bugs found in pycqa/flake8
- 2021-12-24fix AttributeError when catatstrophic failure is triggered
- 2017-07-28Remediate one wafer thing decision logic bug
- 2016-02-20Notifier
- 2015-12-29Fix logic for Notifier.listeners_for