Comments (5)
I was able to resolve this by manually specifying the linter executable with the setting provided in #38, like so:
"linters":
{
"flake8": {
"executable": "/Users/username/.virtualenvs/myvirtualenv/bin/flake8"
}
}
Which I can do on a per-project bases (and works well enough for me). I still believe that there's a bug here -- that we can't rely on the executable at /usr/local/bin/flake8 to actually correspond to the version of python we have defined with @python
.
Perhaps an easy solution is to call flake8 with something like python<version> -m flake8
as is recommended (for users with multiple python versions installed) in the Note here: https://flake8.readthedocs.io/en/latest/#using-flake8 ?
from sublimelinter-flake8.
@sjahl wrote:
I was able to resolve this by manually specifying the linter executable with the setting provided in #38, like so:
"linters":
{
"flake8": {
"executable": "/Users/username/.virtualenvs/myvirtualenv/bin/flake8"
}
}
This work-around does not work for me. (See SublimeLinter/SublimeLinter#573.)
Which I can do on a per-project bases (and works well enough for me).
Just curious, but does ${project}
expansion work for you? (Meaning, would it work if you were to place the virtual env inside your project directory and then reference flake8
by, e.g., ${project}/.virtualenv/bin/flake8
?)
from sublimelinter-flake8.
@posita the ${project_path}
expansion does work for me from my project-settings, though my flake8 extensions are not picked up...
{
"SublimeLinter":
{
"linters":
{
"flake8": {
"executable": "${project_path}/.direnv/python-3.6.1/bin/flake8",
}
}
}
}
When SublimeLinter debug is true, I see on the console:
SublimeLinter: flake8: 0001_initial.py ['/Users/me/source/project/.direnv/python-3.6.1/bin/flake8', '--max-line-length=120', '--jobs=1', '--max-complexity=-1', '-']
SublimeLinter: flake8 output:
stdin:44:121: E501 line too long (176 > 120 characters)
I want this file (and all migrations) to be ignored via flake8-putty settings (which is working from the command line using the same flake8 binary).
from sublimelinter-flake8.
Putting a comment in here so I can come back to the discussion later.
I very much would like to avoid using the ${project}
dir for my virtual environments. That really goes against the ecosystem (i.e. WORKON folder / multiple projects). Seems like there's definitely something missing, though.
from sublimelinter-flake8.
This type of issue seems to be fixed with SL-flake8 3.0.0. Open if i'm mistaken
from sublimelinter-flake8.
Related Issues (20)
- recent update triggers ImportError of configparser module HOT 4
- Does not work at all in Sublime 3.1.1 HOT 3
- F401 handling trips on star imports HOT 3
- No linting errors reported but there should be
- Can't find this package in Package control HOT 3
- .flake8 in a subdirectory HOT 4
- can get E,W type errors, but no F type errors HOT 7
- Error: 'selector' is mandatory in 'cls.defaults' HOT 3
- Is --per-file-ignores supported for flake8 >= 3.7.0? HOT 11
- Package not showing in packaging control anymore HOT 1
- Shows E251 for function definitions having type annotations HOT 2
- Args seem to be getting ignored HOT 1
- Extend "E501 line too long" match till end of line HOT 1
- AttributeError: 'int' object has no attribute 'rstrip' HOT 3
- W type errors not showing HOT 1
- SublimeText 4 Support HOT 2
- Using per-file-ignores argument in settings causes an error HOT 4
- TypeError: expected str, bytes or os.PathLike object, not TextIOWrapper. Why extra " -" is being added after `flake8 --format default`? HOT 6
- plugin_host-3.3 has exited unexpectedly HOT 6
- List unpack operator in assignment triggers false positive HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sublimelinter-flake8.