Comments (5)
It shouldn't work on files that are not python, it doesn't even work on python strings or comments. The linting method is decorated with this decorator:
def only_python(func):
"""Execute the given function if we are on Python source only
"""
@functools.wraps(func)
def wrapper(self, view, *args, **kwargs):
if is_python(view):
return func(self, view, *args, **kwargs)
return wrapper
...
def is_python(view):
"""Determine if the given view location is python code
"""
location = view.sel()[0].begin()
matcher = 'source.python - string - comment'
return view.match_selector(location, matcher)
So it shouldn't try to lint any file that is not Python source. I don't think this should happen. Can you check if closing the file and open it again it lints it?
from anaconda.
Closing and re-opening the file doesn't lint it. However, then restarting ST3 will fire the linter again.
I tried to get the linter to only work on python files by setting the anaconda_linting to false in user settings, then in python settings setting it back to true but anaconda seems to ignore the setting in user settings somehow? (I've tried putting the anaconda_linting: false in both the "main" user settings and the anaconda user settings).
In case it matters (can't see why it would), I have python 2.7 as my installed python, am using ST3's latest dev build (3052), and am running windows 7 x64.
from anaconda.
This is happening for me as well, for any type of file, but only when Sublime is first started, and only for the current view. Once I close that file everything is fine.
It's easy to reproduce:
- Open a non-python file in Sublime.
- Quit Sublime
- Start Sublime
Sublime Text Build 3047, OS X 10.8.4
from anaconda.
Thats because the linting request is fired by a Python view but when the remote method is called on the server the actual view from the actual window has been replaced with a non-python buffer.
It will be eventually fixed.
from anaconda.
Hi @andrewning
I'm workin in #13 right now but this is the next on the list.
from anaconda.
Related Issues (20)
- [IMPORTANT] Giving a little push to the plugin HOT 2
- [WorkAround] New version of the plugin does not work on ST3
- `Go To Definition` won't work after updating to the newest Anaconda release HOT 20
- Auto-brackets after autocompleting functions
- Split View shows help popup on the other column / pane
- Goto Definition open a blank tab HOT 2
- White boxes surrounding all my text during python file editing. HOT 1
- problem with executing python.exe within anaconda HOT 2
- [ bug report] After uninstalling anaconda, Windows cmd will become unavailable
- It not worked for me ... Thank you
- [WorkAround] Manually installing anaconda on ST3 HOT 5
- typing.NamedTuple completion not supported
- CondaSSLError: Encountered an SSL error. Most likely a certificate verification issue. Exception: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2548)
- Use WSL Python as anaconda interpreter in Windows 11 ST4?
- Anaconda ignores PYTHONPATH var
- fk me HOT 1
- Tootips and Autocomplete not working HOT 3
- Anaconda worker doesn't start due to asyncore and asynchat missing HOT 1
- Goto Symbol in Project (ctrl+shift+r) and methods in classes.
- (eval):10: parse error near `^M'
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 anaconda.