ppierre / python-pep8-tmbundle Goto Github PK
View Code? Open in Web Editor NEWTextMate bundle : Check Python source code formatting, according to PEP-8
TextMate bundle : Check Python source code formatting, according to PEP-8
Not sure if you're still developing this, but I encountered the following error when trying to install this bundle on Mac OSX 10.7.5
brobe:Bundles Alan$ osascript -e 'tell app "TextMate" to reload bundles'2013-10-10 09:39:04.019 osascript[16460:707] Error loading /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: dlopen(/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types, 262): no suitable image found. Did find:
/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: no matching architecture in universal wrapper
osascript: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" declares no loadable handlers.
23:37: syntax error: A identifier can’t go after this identifier. (-2740)
Just a quick note - if you have any adobe products =< CS4 installed and try to run osascript on snow leopard you don't get very far.
I know this is an Apple or Adobe issue, not yours, but the installation notes could do with an update to advise users that
arch -i386 osascript -e 'tell app "TextMate" to reload bundles'
will provide a work around while Adobe and Apple have a pissing contest over what place legacy code has.
The pep8 tmbundle fails as follows on TM2:
Traceback (most recent call last):
File "PEP8", line 11, in <module>
import textmate_pep8
File "/Users/fonnescj/Library/Application Support/Avian/Pristine Copy/Bundles/Python PEP8.tmbundle/Support/textmate_pep8.py", line 71, in <module>
from Vendor import pep8
ImportError: No module named Vendor
Having installed the pep8 bundle to /Users/mike/Library/Application Support/Avian/Bundles as per http://blog.macromates.com/2011/locating-bundles/, I am able to see the bundle but not run it. I meet with this error:
Traceback (most recent call last):
File "PEP8", line 8, in <module>
tm_bundle_path = os.environ['TM_BUNDLE_PATH']
File "/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/UserDict.py", line 23, in __getitem__
raise KeyError(key)
KeyError: 'TM_BUNDLE_PATH'
setting TM_BUNDLE_PATH to the path above I then get
Traceback (most recent call last):
File "PEP8", line 11, in <module>
from Support import textmate_pep8
ImportError: No module named Support
so I set TM_BUNDLE_PATH to /Users/mike/Library/Application Support/Avian/Bundles/Python PEP8.tmbundle (which seems worryingly specific) but that fixes the problem and allows pep8 to run.
(thanks for the pep8 bundle, btw!)
I had to clone Python PEP8.tmbundle into:
cd /Applications/TextMate.app/Contents/SharedSupport/Bundles/
This bundle works great - except on files which contain arrays with numpy slice notation. Here is an example:
import numpy as np
a = np.zeros(2, 2)
print a[0, :]
will give the following error:
3:10 E203 : whitespace before ':'
and
import numpy as np
a = np.zeros(2, 2)
print a[0,:]
will give the following error:
3:9 E231 : missing whitespace after ','
Is there a way to get around this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.