diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2014-03-24 00:52:47 +0100 |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2014-03-24 00:52:47 +0100 |
commit | dff303308714da0da729d97f4f423541d9d33431 (patch) | |
tree | dda214fbae63c3980c975f1c6e3c84b2654ed593 | |
parent | af91d986c091bec2972c38b9cae505ad2d6c762c (diff) | |
download | pep8-dff303308714da0da729d97f4f423541d9d33431.tar.gz |
The logical checks can return None; issue #250
-rw-r--r-- | CHANGES.txt | 3 | ||||
-rwxr-xr-x | pep8.py | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index 034cc7f..96d879a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -20,6 +20,9 @@ Changelog * Fix behaviour when ``exclude`` is in the configuration file and the current directory is not the project directory. (Issue #247) +* The logical checks can return ``None`` instead of an empty iterator. + (Issue #250) + 1.4.6 (2013-07-02) ------------------ @@ -1345,10 +1345,10 @@ class Checker(object): for name, check, argument_names in self._logical_checks: if self.verbose >= 4: print(' ' + name) - for result in self.run_check(check, argument_names): - offset, text = result + for result in self.run_check(check, argument_names) or (): + (offset, text) = result if isinstance(offset, tuple): - orig_number, orig_offset = offset + (orig_number, orig_offset) = offset else: for token_offset, token in self.mapping: if offset >= token_offset: |