JBKahn / flake8-debugger

flake8 debug statement checker
MIT License
41 stars 10 forks source link

Cannot lint stdin #18

Closed auscompgeek closed 5 years ago

auscompgeek commented 5 years ago
% flake8 - < /dev/null
Traceback (most recent call last):
  File "/usr/bin/flake8", line 11, in <module>
    load_entry_point('flake8==3.7.7', 'console_scripts', 'flake8')()
  File "/usr/lib/python3.7/site-packages/flake8/main/cli.py", line 18, in main
    app.run(argv)
  File "/usr/lib/python3.7/site-packages/flake8/main/application.py", line 394, in run
    self._run(argv)
  File "/usr/lib/python3.7/site-packages/flake8/main/application.py", line 382, in _run
    self.run_checks()
  File "/usr/lib/python3.7/site-packages/flake8/main/application.py", line 301, in run_checks
    self.file_checker_manager.run()
  File "/usr/lib/python3.7/site-packages/flake8/checker.py", line 330, in run
    self.run_serial()
  File "/usr/lib/python3.7/site-packages/flake8/checker.py", line 314, in run_serial
    checker.run_checks()
  File "/usr/lib/python3.7/site-packages/flake8/checker.py", line 608, in run_checks
    self.run_ast_checks()
  File "/usr/lib/python3.7/site-packages/flake8/checker.py", line 504, in run_ast_checks
    for (line_number, offset, text, check) in runner:
  File "/usr/lib/python3.7/site-packages/flake8_debugger.py", line 102, in run
    self.load_file()
  File "/usr/lib/python3.7/site-packages/flake8_debugger.py", line 93, in load_file
    self.lines = pycodestyle.stdin_get_value().splitlines(True)
  File "/usr/lib/python3.7/site-packages/pycodestyle.py", line 1726, in stdin_get_value
    return TextIOWrapper(sys.stdin.buffer, errors='ignore').read()
ValueError: I/O operation on closed file
nndii commented 5 years ago

That's a known issue and it solves pretty easily: https://github.com/JBKahn/flake8-print/pull/36 But JBKahn ignoring it for some reason.

JBKahn commented 5 years ago

Same as my comment on flake8 print, but I will look at this today too.

JBKahn commented 5 years ago

should be fixed now @auscompgeek