tarnfeld / atom-pep8 Goto Github PK
View Code? Open in Web Editor NEWAn atom package that automatically validates .py files with pep8
License: MIT License
An atom package that automatically validates .py files with pep8
License: MIT License
I don't know if this is a bug, or I just haven't been able to figure it out, but I can't change the size of the window at the bottom that displays pep8 errors. It's taking up way too much space - space that I would like to use to display code instead.
Atom Version: 0.194.0
System: Mac OS X 10.10.3
Thrown From: pep8 package, v0.2.0
Failed to load the pep8 package
At Cannot read property 'prototype' of undefined
TypeError: Cannot read property 'prototype' of undefined
at __extends (/Users/jason/.atom/packages/pep8/lib/pep8-view.coffee:1:1)
at /Users/jason/.atom/packages/pep8/lib/pep8-view.coffee:6:5
at Object.<anonymous> (/Users/jason/.atom/packages/pep8/lib/pep8-view.coffee:95:5)
at Object.<anonymous> (/Users/jason/.atom/packages/pep8/lib/pep8-view.coffee:1:1)
at Module._compile (module.js:452:26)
at Object.requireCoffeeScript (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/coffee-cash/lib/coffee-cash.js:85:19)
at Module.load (module.js:347:32)
at Function.Module._load (module.js:302:12)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at Object.<anonymous> (/Users/jason/.atom/packages/pep8/lib/pep8.coffee:5:18)
at Object.<anonymous> (/Users/jason/.atom/packages/pep8/lib/pep8.coffee:1:1)
at Module._compile (module.js:452:26)
at Object.requireCoffeeScript (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/coffee-cash/lib/coffee-cash.js:85:19)
at Module.load (module.js:347:32)
at Function.Module._load (module.js:302:12)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at Package.module.exports.Package.requireMainModule (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:677:34)
at /Applications/Atom.app/Contents/Resources/app.asar/src/package.js:170:28
at Package.module.exports.Package.measure (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:147:15)
at Package.module.exports.Package.load (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:161:12)
at PackageManager.module.exports.PackageManager.loadPackage (/Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:354:14)
at PackageManager.module.exports.PackageManager.loadPackages (/Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:324:14)
at Atom.module.exports.Atom.startEditorWindow (/Applications/Atom.app/Contents/Resources/app.asar/src/atom.js:620:21)
at Object.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-bootstrap.js:12:8)
at Object.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-bootstrap.js:23:4)
at Module._compile (module.js:452:26)
at Object.loadFile [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/babel.js:162:21)
at Module.load (module.js:347:32)
at Function.Module._load (module.js:302:12)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at window.onload (file:///Applications/Atom.app/Contents/Resources/app.asar/static/index.js:54:25)
When I make a change to a file and the linter runs again I expect the new output to replace the previous one, currently it does some weird merge thing that is horribly broken.
Store package style sheets in the styles/
directory instead of stylesheets/
in the pep8
package
Package.getStylesheetsPath (/usr/share/atom/resources/app.asar/src/package.js:460:9)
Package.getStylesheetPaths (/usr/share/atom/resources/app.asar/src/package.js:471:32)
Package.loadStylesheets (/usr/share/atom/resources/app.asar/src/package.js:453:38)
<unknown> (/usr/share/atom/resources/app.asar/src/package.js:183:19)
Package.measure (/usr/share/atom/resources/app.asar/src/package.js:163:15)
Package.load (/usr/share/atom/resources/app.asar/src/package.js:177:12)
Atom will no longer load this package after June 1st without changes. There are a couple deprecations on the latest version (0.2.0
) of this package:
atom.views.getView(atom.workspace)
, which returns an HTMLElement.styles/
directory instead of stylesheets/
in the <pack-name>
package$$
from atom
is no longer supported. Please require atom-space-pen-views
instead: {$$} = require 'atom-space-pen-views'
Add "atom-space-pen-views": "^2.0.3"
to your package dependencies.SelectListView
from atom
is no longer supported. Please require SelectListView
from atom-space-pen-view
instead: {SelectListView} = require 'atom-space-pen-views'
Note that the API has changed slightly! Please read the docs at https://github.com/atom/atom-space-pen-views Add "atom-space-pen-views": "^2.0.3"
to your package dependencies.Visit https://gist.github.com/benogle/6d09e295c84b717ef9b4 and search for your package name to see up-to-date deprecations.
If this package has been replaced by another package or functionality in core, please reply with this information.
See atom/atom#6867 for more info. Thanks!
I'm new to Atom, so I'm probably doing something foolish… but when I open the command palette and type "pep8" I find nothing.
In the console (ctrl-shift-i) I see this:
activate linter-python-pep8
How do I trigger the pep8 linting?
atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace)
,
which returns an HTMLElement.
Atom.Object.defineProperty.get (/Applications/Atom.app/Contents/Resources/app/src/atom.js:54:11)
Object.activate (/Users/flavio/.atom/packages/pep8/lib/pep8.coffee:36:13)
I am working on a community project which contains a lot of pep8 violations. Now if i save the document the pep8 validation gets executed. The first violation get the focus and the cursor jumps to this line. I have to scroll down to my code every time i save.
You may argue that this is the expected behavior, but i find it quite annoying.
It would be great if you could make the validation on safe configurable.
I'm trying to disable the following pep8 errors: E501
, E127
, and E128
. I've manually edited the ignoreErrors
attribute of pep8
in config.cson
to each of the follwing:
['E501', 'E127', 'E128']
(figuring that an array of strings is what was required)'E501, E127, E128'
(which conforms to the brief example given on the package page)['E501, E127, E128']
(grasping at straws....)[E501, E127, E128]
(...barewords? no....)E501, E127, E128
(Again, grasping at straws)And none of these worked (in particular, an E501 was still showing up when saving a particular file with a 112 character line).
Am I missing anything obvious, here?
Call ::getActiveTextEditor instead
Workspace.getActiveEditor (/usr/share/atom/resources/app.asar/src/workspace.js:1022:12)
Object.lint (/home/developer/.atom/packages/pep8/lib/pep8.coffee:40:32)
atom-workspace.<anonymous> (/home/developer/.atom/packages/pep8/lib/pep8.coffee:37:13)
atom-workspace.handler (/usr/share/atom/resources/app.asar/src/space-pen-extensions.js:115:32)
atom-workspace.jQuery.event.dispatch (/usr/share/atom/resources/app.asar/node_modules/space-pen/vendor/jquery.js:4681:9)
atom-workspace.elemData.handle (/usr/share/atom/resources/app.asar/node_modules/space-pen/vendor/jquery.js:4359:46)
When saving a .py
file the console of developer tools pops up showing:
Uncaught Error: spawn ENOENT
I am sure this is caused by atom-pep8.
If not, it's not working. I installed it and made sure the path is working. Screwed around in a .py file and tried to find pep8 in the command palette menu thing. Or, how else are you supposed to start it?
When I finish to check my pep8, the tab is blocked showing the last error fixed. I can't close and I have to close the atom and restart again.
Am I doing anything wrong?
Thanks in advance
Xurxo
[Enter steps to reproduce below:]
Atom Version: 0.184.0
System: linux 3.13.0-46-generic
Thrown From: pep8 package, v0.2.0
Uncaught TypeError: undefined is not a function
At /home/foehn/.atom/packages/pep8/lib/pep8-view.coffee:55
TypeError: undefined is not a function
at Pep8ErrorsView.module.exports.Pep8ErrorsView.moveToPosition (/home/foehn/.atom/packages/pep8/lib/pep8-view.coffee:55:23)
at Pep8ErrorsView.module.exports.Pep8ErrorsView.selectItemView (/home/foehn/.atom/packages/pep8/lib/pep8-view.coffee:48:10)
at Pep8ErrorsView.module.exports.SelectListView.selectNextItemView (/usr/share/atom/resources/app/src/select-list-view.js:286:19)
at atom-workspace.<anonymous> (/home/foehn/.atom/packages/pep8/lib/pep8-view.coffee:41:18)
at atom-workspace.handler (/usr/share/atom/resources/app/src/space-pen-extensions.js:112:34)
at atom-workspace.jQuery.event.dispatch (/usr/share/atom/resources/app/node_modules/space-pen/vendor/jquery.js:4681:9)
at atom-workspace.elemData.handle (/usr/share/atom/resources/app/node_modules/space-pen/vendor/jquery.js:4359:46)
-0:48.1 editor:indent (atom-text-editor.editor)
56x -0:47.8 core:move-right (atom-text-editor.editor)
56x -0:44.3 core:move-left (atom-text-editor.editor)
-0:40.5 editor:select-to-first-character-of-line (atom-text-editor.editor)
2x -0:40.2 core:backspace (atom-text-editor.editor)
-0:38.9 core:move-right (atom-text-editor.editor)
-0:38.6 editor:newline (atom-text-editor.editor)
-0:38.1 snippets:next-tab-stop (atom-text-editor.editor)
-0:38.1 snippets:expand (atom-text-editor.editor)
-0:38.1 editor:indent (atom-text-editor.editor)
54x -0:37.8 core:move-right (atom-text-editor.editor)
-0:34.9 editor:newline (atom-text-editor.editor)
-0:34.5 core:backspace (atom-text-editor.editor)
5x -0:33.1 core:save (atom-text-editor.editor)
-0:01.5 core:confirm (atom-text-editor.editor.mini.is-focused)
2x -0:00.2 core:move-down (atom-text-editor.editor.mini.is-focused)
{
"core": {
"themes": [
"atom-dark-ui",
"atom-dark-syntax"
],
"disabledPackages": [
"atom-terminal",
"terminal-status",
"pep8",
"terminal-panel",
"linter-pep8"
]
},
"pep8": {
"PEP8Path": "/usr/local/bin/pep8",
"ignoreErrors": []
}
}
# User
No installed packages
# Dev
No dev packages
atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace)
,
which returns an HTMLElement.
Atom.Object.defineProperty.get (/Applications/Atom.app/Contents/Resources/app/src/atom.js:55:11)
Object.activate (/Users/ertac/.atom/packages/pep8/lib/pep8.coffee:36:13)
I installed atom-pep8 and started editing a file that has known flaws. Now's not the time to correct them.
So I have my cursor on line, say, 100 and hit Cmd-S to save. That then brings up the 3 pep8 errors I have in that file. The first one is on line 150 so it moves my cursor down there to line 150. Annoying.
I would personally much prefer to decide myself when to run pep8. Not on save but when I run it.
Or, if it has to be on save, it shouldn't move the cursor.
Requiring SelectListView
from atom
is no longer supported.
Please require SelectListView
from atom-space-pen-view
instead:
{SelectListView} = require 'atom-space-pen-views'
Note that the API has changed slightly! Please read the docs at https://github.com/atom/atom-space-pen-views
Add "atom-space-pen-views": "^2.0.3"
to your package dependencies.
Object.Object.defineProperty.get (C:\Users\dmit1_000\AppData\Local\atom\app-0.204.0\resources\app.asar\exports\atom.js:90:11)
Object.<anonymous> (C:\Users\dmit1_000\.atom\packages\pep8\lib\pep8-view.coffee:1:12)
Object.<anonymous> (C:\Users\dmit1_000\.atom\packages\pep8\lib\pep8-view.coffee:97:4)
Module._compile (module.js:452:26)
Object.requireCoffeeScript (C:\Users\dmit1_000\AppData\Local\atom\app-0.204.0\resources\app.asar\node_modules\coffee-cash\lib\coffee-cash.js:85:19)
Module.load (module.js:347:32)
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.