diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2012-12-09 13:47:02 -0800 |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2012-12-09 13:47:02 -0800 |
commit | bc8ec1877bb9a5c67d856c662e3fa70c17dbf3a7 (patch) | |
tree | d0ea9ef4e0219b03ccdabee1570631b31a502865 | |
parent | 46018e052ee8f2512370dbe22f153c0873a2325e (diff) | |
parent | cc4d7e0da8c26dc6607209f9e34fc44c1133a758 (diff) | |
download | pep8-bc8ec1877bb9a5c67d856c662e3fa70c17dbf3a7.tar.gz |
Merge pull request #128 from yole/input-from-stdin
accept '-' as input filename to read data for checking from standard input
-rwxr-xr-x | pep8.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1182,6 +1182,9 @@ class Checker(object): if filename is None: self.filename = 'stdin' self.lines = lines or [] + elif filename == '-': + self.filename = 'stdin' + self.lines = stdin_get_value().splitlines(True) elif lines is None: try: self.lines = readlines(filename) |