Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aborts with error when flake8 is feed from its stdin #1

Open
memeplex opened this issue Oct 11, 2019 · 1 comment
Open

Aborts with error when flake8 is feed from its stdin #1

memeplex opened this issue Oct 11, 2019 · 1 comment
Assignees

Comments

@memeplex
Copy link

memeplex commented Oct 11, 2019

  • Operating System: Ubuntu 19.04
  • Python version: 3.7.3
  • flake8-breakpoint version used: 1.1.0

Description

Installed the plugin, tried to use it with emacs flymake, which feeds flake from the stdin, it stopped working so I check doing the same manually in the terminal, I got:

~::  flake8 - < /tmp/test.py 
Traceback (most recent call last):
  File "/home/carlos/.local/bin/flake8", line 10, in <module>
    sys.exit(main())
  File "/home/carlos/.local/lib/python3.7/site-packages/flake8/main/cli.py", line 18, in main
    app.run(argv)
  File "/home/carlos/.local/lib/python3.7/site-packages/flake8/main/application.py", line 393, in run
    self._run(argv)
  File "/home/carlos/.local/lib/python3.7/site-packages/flake8/main/application.py", line 381, in _run
    self.run_checks()
  File "/home/carlos/.local/lib/python3.7/site-packages/flake8/main/application.py", line 300, in run_checks
    self.file_checker_manager.run()
  File "/home/carlos/.local/lib/python3.7/site-packages/flake8/checker.py", line 331, in run
    self.run_serial()
  File "/home/carlos/.local/lib/python3.7/site-packages/flake8/checker.py", line 315, in run_serial
    checker.run_checks()
  File "/home/carlos/.local/lib/python3.7/site-packages/flake8/checker.py", line 598, in run_checks
    self.run_ast_checks()
  File "/home/carlos/.local/lib/python3.7/site-packages/flake8/checker.py", line 502, in run_ast_checks
    for (line_number, offset, text, check) in runner:
  File "/home/carlos/.local/lib/python3.7/site-packages/flake8_plugin_utils/plugin.py", line 48, in run
    self._load_file()
  File "/home/carlos/.local/lib/python3.7/site-packages/flake8_plugin_utils/plugin.py", line 60, in _load_file
    with open(self._filename) as f:
FileNotFoundError: [Errno 2] No such file or directory: 'stdin'

After uninstalling the plugin:

~:: cat /tmp/test.py  | flake8 -
stdin:7:1: F821 undefined name 'deew'
stdin:9:1: F821 undefined name 'f'

The file is simply:

~:: cat /tmp/test.py 
x = 2
y = 3

z = x + y


deew

f()
breakpoint()
@afonasev
Copy link
Owner

I'll try to fix it, thx for issue

@afonasev afonasev self-assigned this Oct 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants