pyflakes

Running flymake for python when files don't have .py extension

点点圈 提交于 2019-12-12 15:15:50
问题 I'm not a lisp guy at all, but my primary scripting environment lives on emacs and I need some help to get my flymake/pyflakes running when there is no .py extension on files. Because some of the scripts here at my work doesn't have .py extension on them. This is pretty working with pylint, pep8, pychecker etc, when I'm reading/coding a file that has the .py extension. ;; flymake for python (add-to-list 'load-path "~/.emacs.d/plugins/flymake") (when (load "flymake" t) (defun flymake-pylint

How to suppress a certain warning in Spyder editor?

耗尽温柔 提交于 2019-12-11 05:34:43
问题 The editor in Spyder always gives me warnings for unused imports/variables immediately after I type the line. I want to suppress such warnings. How do I do that? And I want this to happen for every file I open in the Spyder editor, wouldn't prefer local fixes. I tried adding 'disable=' in ~/.pylintrc and it didn't work. Moreover, the Spyder editor uses pyflakes anyway. 回答1: You need to go to Tools > Preferences > Editor > Code Introspection/Analysis and deactivate the option called Real-time

How would I start integrating pyflakes with Hudson

守給你的承諾、 提交于 2019-12-05 04:39:56
We use Hudson for continuous integration with the Violations Plugin which parses our output from pylint. However, pylint is a bit too strict, and hard to configure. What we'd rather use is pyflakes which would give us the right level of "You're doing it wrong." You can adapt pyflakes and pep8 output to work with the Violations pylint plugin. pyflakes path/to/src | awk -F\: '{printf "%s:%s: [E]%s\n", $1, $2, $3}' > violations.pyflakes.txt pep8 path/to/src | awk -F\: '{printf "%s:%s: [%s]%s\n", $1, $2, substr($4,2,4), substr($4,6)}' > violations.pep8.txt You could use a regex or concatenate the

How to make Vim error list permanent using PyFlakes?

☆樱花仙子☆ 提交于 2019-12-05 01:47:20
问题 I want to use pep8 as my makeprg in order to check and fix my code compliance to PEP8 (Style guide for python code). I used the command :set makeprg=pep8\ --repeat\ % , and when I do :make it works, the error list is populated and I can use :cn , :cp and :copen to navigate and see the error list in the QuickFix window. But as soon as I change something in my python source file the errorlist becomes empty, the QuickFix window loses its content and I cannot navigate the list anymore. I suspect

Can flymake's temporary file be created in the system's temporary directory?

橙三吉。 提交于 2019-12-04 23:42:03
问题 I am currently using the following code to hook up flymake and Pyflakes in emacs: (defun flymake-create-temp-in-system-tempdir (filename prefix) (make-temp-file (or prefix "flymake"))) and then I pass this function to flymake-init-create-temp-buffer-copy . (Taken from http://hustoknow.blogspot.com/2010/09/emacs-and-pyflakes-using-tmp-directory.html). This code worked fine until yesterday. When I visit certain Python files, I get the following error: switched OFF Flymake mode for buffer admin

How to make Vim error list permanent using PyFlakes?

倖福魔咒の 提交于 2019-12-03 16:24:01
I want to use pep8 as my makeprg in order to check and fix my code compliance to PEP8 (Style guide for python code) . I used the command :set makeprg=pep8\ --repeat\ % , and when I do :make it works, the error list is populated and I can use :cn , :cp and :copen to navigate and see the error list in the QuickFix window. But as soon as I change something in my python source file the errorlist becomes empty, the QuickFix window loses its content and I cannot navigate the list anymore. I suspect that this is caused by PyFlakes, a Vim extension that highlights Python errors on-the-fly. How can I

Can flymake's temporary file be created in the system's temporary directory?

点点圈 提交于 2019-12-03 16:03:01
I am currently using the following code to hook up flymake and Pyflakes in emacs: (defun flymake-create-temp-in-system-tempdir (filename prefix) (make-temp-file (or prefix "flymake"))) and then I pass this function to flymake-init-create-temp-buffer-copy . (Taken from http://hustoknow.blogspot.com/2010/09/emacs-and-pyflakes-using-tmp-directory.html ). This code worked fine until yesterday. When I visit certain Python files, I get the following error: switched OFF Flymake mode for buffer admin.py due to fatal status CFGERR, warning Configuration error has occured while running (pyflakes ../../.

Running pyflakes remotely with flymake and tramp in emacs?

冷暖自知 提交于 2019-12-03 08:49:22
问题 I'm trying to use flymake to run pyflakes, as suggested here This works fine for local files, and almost works with remote files with a bit of tweaking, but I'm left with a problem where flymake/pyflakes 'modifies' the buffer when it runs (although nothing actually seems to change), which renders it a bit useless in practice (e.g. saving a file runs flymake which immediately modifies the buffer again). Here's what I did to almost get it working: Installed pyflakes on the remote box.

Running pyflakes remotely with flymake and tramp in emacs?

不羁的心 提交于 2019-12-02 22:44:33
I'm trying to use flymake to run pyflakes, as suggested here This works fine for local files, and almost works with remote files with a bit of tweaking, but I'm left with a problem where flymake/pyflakes 'modifies' the buffer when it runs (although nothing actually seems to change), which renders it a bit useless in practice (e.g. saving a file runs flymake which immediately modifies the buffer again). Here's what I did to almost get it working: Installed pyflakes on the remote box. Customized my tramp-remote-process-environment variable so that pyflakes could be found in its PATH Used a

Errors when running vim with the pyflakes plugin

徘徊边缘 提交于 2019-12-02 09:07:45
问题 I'm playing with the pyflakes plugin for vim and now when I open a python file I get the error messages in the screenshot here Any ideas how to fix this? Thanks in advance... 回答1: https://github.com/kevinw/pyflakes-vim/issues/27 You can recommend to users that they clone the pyflakes-vim repo with git clone --recursive or you can suggest after the fact to use git submodule update --init --recursive if pyflakes-vim is saved as a git submodule itself. Or go to pyflakes-vim and: git submodule