diff --git a/CHANGELOG.md b/CHANGELOG.md index 423ab498..a61f5577 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ -# 2.14 (2024-12-08) +# next (unreleased) * Handle `while True` loops without `break` statements (kreathon). + +# 2.14 (2024-12-08) + * Improve reachability analysis (kreathon, #270, #302). * Add type hints for `get_unused_code` and the fields of the `Item` class (John Doknjas, #361). diff --git a/vulture/reachability.py b/vulture/reachability.py index df13f176..d207f7fd 100644 --- a/vulture/reachability.py +++ b/vulture/reachability.py @@ -10,8 +10,8 @@ def __init__(self, report): # Since we visit the children nodes first, we need to maintain a flag # that indicates if a break statement was seen. When visiting the - # parent (While, For, or AsyncFor), the value is checked and reset. - # Assumes code is valid (break statements only in loops). + # parent (While, For or AsyncFor), the value is checked (for While) + # and reset. Assumes code is valid (break statements only in loops). self._current_loop_has_break_statement = False def visit(self, node):