One function
Notifier in pycqa/flake8
The author described this change as “Fix Notifier.listeners_for”. It counts as a record because the check below fails on the code as it stood at 58b2ca69e and passes on 98357e71d, with nothing else changed between the two runs.
Projectpycqa/flake8
Fix saved2016-02-20
Sharing licenceMIT · LICENSE
Change size+2 −1
What the code was meant to do, written into the code itself as a docstring
Object that tracks and notifies listener objects.
The change
| 27 | 27 | path = error_code | |
| 28 | 28 | while path: | |
| 29 | 29 | node = self.listeners.find(path) | |
| 30 | - | for listener in node.data: | |
| 30 | + | listeners = getattr(node, 'data', []) | |
| 31 | + | for listener in listeners: | |
| 31 | 32 | yield listener | |
| 32 | 33 | path = path[:-1] | |
| 33 | 34 |
The check that tells the two apart
fail→pass·tests/unit/test_notifier.py::TestNotifier::test_no_listeners_for[W123]
Check file tests/unit/test_notifier.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 it58b2ca69e466ed8669d830dc6a95fc32363448d7
Broken version dated2016-02-19
Moduleflake8.plugins.notifier
Units changedNotifier
Fingerprint04db440bc8c7654d
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
- 2022-11-08load_config
- 2021-12-24fix AttributeError when catatstrophic failure is triggered
- 2017-07-28Remediate one wafer thing decision logic bug
- 2015-12-29Fix logic for Notifier.listeners_for