pyflakes Questions
2
Solved
W391 says that there should be one (and only one) blank line at the end of file. However, flake8 reports the error when there is at least one newline at the end of the file:
$ cat /tmp/test.py
def ...
6
Solved
I split my tests across multiple Python files:
tests
├── __init__.py
├── test_apples.py
└── test_bananas.py.py
I import the tests in the ‘__init__.py’ file:
from test_apples import ApplesTest
from...
9
Solved
A lot of our modules start with:
try:
import json
except ImportError:
from django.utils import simplejson as json # Python 2.4 fallback.
...and it's the only Pyflakes warning in the entire fil...
6
Solved
I installed vim-flake8 by git cloning it on my Pathogen bundle folder as usual, but when I tried to run the plugin pressing F7 or using :call Flake8() in one Python file I receive the following mes...
1
Sometimes a Python module import that appears to be unused, is in fact essential to the proper functioning of the program. Having seemingly unused imports gives rise to spurious messages from tools...
Chlorpromazine asked 23/8, 2019 at 16:17
1
Solved
I write a module for Salt. By the documentation it adds __salt__ object into builtins. So, pyflake warn me that __salt__ is undefined when I run prospector and mypy says the same, that __salt__ is ...
1
Solved
With flake8, to disable a certain error on a line you do this:
example = lambda: 'example' # noqa: E731,E123
However, if I have multiline a statement, flake8 fails to parse the noqa statment at ...
1
My project uses a width of 4 spaces for indentation.
However, running flake8 on it yields warnings that say that expected tab/indentation width was 2 spaces.
How do I configure flake8 to correct...
Her asked 3/3, 2014 at 18:32
1
Solved
Problem overview:
In my project's main script, gettext installs the function _() that is used in other modules for translations (like in print(_('Something to translate'))).
As stated by the doc:...
Perbunan asked 15/6, 2016 at 15:47
1
Solved
If I create a file test.py with the following poorly-formatted contents:
import re
long_string = "foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo"
class Foo():
p...
1
Solved
I am writing in python 3.5.1 and I am a programming novice.
I use gedit with a pep8 and pyflakes plugins showing style mistakes according to the python style guide. I do not know whether to follow...
Stipple asked 19/1, 2016 at 11:7
3
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...
Padauk asked 13/3, 2010 at 0:46
2
Solved
I am using SublimePythonIDE which is using pyflakes.
There are some errors that I would like it to ignore like:
(E501) line too long
(E101) indentation contains mixed spaces and tabs
What i...
Hibernal asked 7/6, 2015 at 20:56
2
Solved
I am working on a django project and am trying to run pyflakes on an app in it. I need to exclude the "migrations" directory from pyflakes.
For pep8 I can do
pep8 --exclude=migrations app_name
...
Acroterion asked 30/6, 2014 at 16:48
4
Solved
For checking code in python mode I use flymake with pyflakes
Also I want check code style (pep8) with pylint (description on the same page with pyflakes)
This solutions work.
But I can't configu...
3
Solved
Pyflakes does not deal very well with the following code:
@property
def nodes(self):
return self._nodes
@nodes.setter
def nodes(self, nodes):
"""
set the nodes on this object.
"""
assert nod...
Kight asked 24/9, 2012 at 10:48
2
Solved
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 s...
4
Solved
I noticed pylint doesn't handle well the case of:
@property
def foo(self):
return self._bar.foo
@foo.setter
def foo(self, foo_val):
self._bar.foo = foo_val
Though it's a perfectly valid case ...
2
Solved
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/p...
1
© 2022 - 2024 — McMap. All rights reserved.