Git Product home page Git Product logo

atom-python-autopep8's People

Contributors

bh avatar jmfederico avatar kareljakubec avatar lexicalunit avatar markbaas avatar vadim-su avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

atom-python-autopep8's Issues

Format on Save ERROR

Atom completely crashes whenever I try to save a file when "Format on Save" box is checked in the autopep8 Settings menu.

Autopep does not work.

Hey:)
Yesterday I installed Atom and with it by recommendation autopep. But it does not work. I have done pip install autopep8. When I save with way to much empty lines nothing happens except the autopip referenced red x in the left downside corner.

Thx for your help in advance!
autop

clashes with linters that lint on-save

Could you help with this issue:
AtomLinter/linter-flake8#64 (comment)

Problem is that the linter-flake8 checks just before autopep8 changes the buffer, so I always have to save twice like this to avoid having errors that autopep8 already did repair.

Somehow, autopep8 should be running before the linter get's active, and the author of linter-flake8 recommend the setting modifiesBuffer:true for your plugin? But apparently, this is only supported by linter-plugins? Not sure about that, would be great if this could work together better.

There is no option to explicitly only pep8 .py files

I don't se an option where you can chose if you only want to pep8 .py files.
I had an issue using Kivy, where I needed to create a .kv file. One line needed explicitly to be:
<AppGame>:
When I save it, the pep8 script will modify it to:
<AppGame >:

This format won't work with Kivy. It need to explicitly be without space. So I don't want to run the script on .kv files.

Could we get a new release?

There was a commit from 2016 that makes autopep8 aware of MagicPython, but the latest version from installing with apm gets us an older version from 2015 (0.1.3).

executable not being picked up from PATH

This seems to be a common problem currently in Atom, apparently some API has changed inside Atom that prevents this from working?
I currently have to provide the full path in the settings, as for flake8 and isort, those packages suffer from the same problem. I don't know if this should be solved on Atom level or on package level.
I would prefer the flexibility to have it set by the PATH environment because that way the currently active virtual environment decides which executable is being used for this. Even so maybe for pep8 there are no differences between Python2 and Python3?

Is this plugin still being maintained?

@markbaas
Thanks for a very useful plugin!

However, it seems there hasn't been any update in a few years, and the latest commits from 2016 are not even available on apmโ€ฆ

If you are no longer interested in maintaining it, perhaps you would consider handing the repo over to someone, so that the apm version can at least be updated?

Cheers!

Cannot make it work

Atom: 1.12
OS: macOS 10.11.6
Python: 3.5 inside conda env

I use conda so to make sure autopep8 is found, I put the absolute path to the executable into the settings.
I tried it both with the "Format on Save" option and the manual call via the menu, to no avail.
I have several PEP8 issues, like E225 (missing whitespace after operator).
When using autopep8 inside the Terminal these issues are being found and corrected.
How can I help to debug this?

Failed to load the python-autopep8 package

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.19.0 x64
Electron: 1.6.9
OS: Unknown Windows version
Thrown From: python-autopep8 package 0.1.4

Stack Trace

Failed to load the python-autopep8 package

At Cannot find module 'jquery'

Error: Cannot find module 'jquery'
    at Module._resolveFilename (module.js:470:15)
    at Module._resolveFilename (~/AppData/Local/atom/app-1.19.0/resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.get_Module._resolveFilename (~/AppData/Local/atom/app-1.19.0/resources/app/src/module-cache.js:354:58)
    at Module.require (~/AppData/Local/atom/app-1.19.0/resources/app/static/index.js:40:43)
    at require (~/AppData/Local/atom/app-1.19.0/resources/app/src/native-compile-cache.js:66:33)
    at /packages/atom-python-autopep8/lib/python-autopep8.coffee:1:5)
    at /packages/atom-python-autopep8/lib/python-autopep8.coffee:1:1)
    at /packages/atom-python-autopep8/lib/python-autopep8.coffee:1:1)
    at Module.get_Module._compile (~/AppData/Local/atom/app-1.19.0/resources/app/src/native-compile-cache.js:106:36)
    at Object.value [as .coffee] (~/AppData/Local/atom/app-1.19.0/resources/app/src/compile-cache.js:239:29)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (~/AppData/Local/atom/app-1.19.0/resources/app/static/index.js:47:45)
    at require (~/AppData/Local/atom/app-1.19.0/resources/app/src/native-compile-cache.js:66:33)
    at /packages/atom-python-autopep8/lib/index.coffee:1:18)
    at /packages/atom-python-autopep8/lib/index.coffee:1:1)
    at /packages/atom-python-autopep8/lib/index.coffee:1:1)
    at Module.get_Module._compile (~/AppData/Local/atom/app-1.19.0/resources/app/src/native-compile-cache.js:106:36)
    at Object.value [as .coffee] (~/AppData/Local/atom/app-1.19.0/resources/app/src/compile-cache.js:239:29)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (~/AppData/Local/atom/app-1.19.0/resources/app/static/index.js:47:45)
    at require (internal/module.js:20:19)
    at customRequire (~/AppData/Local/atom/app-1.19.0/resources/app/static/<embedded>:96:26)
    at Package.module.exports.Package.requireMainModule (~/AppData/Local/atom/app-1.19.0/resources/app/src/package.js:887:35)
    at ~/AppData/Local/atom/app-1.19.0/resources/app/src/package.js:158:34
    at Package.module.exports.Package.measure (~/AppData/Local/atom/app-1.19.0/resources/app/src/package.js:99:21)
    at Package.module.exports.Package.load (~/AppData/Local/atom/app-1.19.0/resources/app/src/package.js:144:18)

Commands

     -0:36.8.0 tree-view:show (atom-workspace.workspace.scrollbars-visible-always)

Non-Core Packages

atom-beautify 0.30.4 
python-autopep8 0.1.4 
atom-python-package 0.7.1 
atom-python-run 0.8.1 
atom-terminal-panel 4.4.4 
atom-ternjs 0.18.3 
atom-typescript 11.0.6 
autocomplete-python 1.10.0 
darkpython-syntax 0.5.0 
emmet 2.4.3 
file-icons 2.1.10 
highlight-selected 0.13.1 
Hydrogen 1.19.0 
hyperclick 0.1.3 
js-hyperclick 1.11.0 
linter 2.2.0 
linter-flake8 2.2.1 
linter-pylama 0.9.3 
linter-pylint 2.1.0 
linter-python 3.1.2 
linter-python-pep8 0.2.0 
monokai 0.24.0 
nom undefined 
npm undefined 
project-manager 3.3.5 
python-debugger 0.2.0 
python-indent 1.1.0 
python-tools 0.6.9 
quick-highlight 0.10.0 
Remote-FTP 1.1.3 
remote-sync 4.1.5 
script 3.15.0 
seti-ui 1.9.0 
simplified-chinese-menu 5.3.4 
tortoise-svn 0.5.1 

Python-autopep8 close Atom

I installed python-autopep8, but when I execute ctrl+s or ctrl+alt+s to correct pep8 it close Atom.
When I reopen my file it was correct, but always I use keyboard shortcut Atom close.

OS: Windows 10 64x
Atom: 1.18.0 64x

Cannot install pyflakes

[Linter] Error running pyflakes Error: Failed to spawn command pyflakes. Make sure pyflakes is installed and on your PATH
at /home/rasha/.atom/packages/linter-pyflakes/node_modules/atom-linter/lib/helpers.js:130:24
at
at process._tickCallback (internal/process/next_tick.js:188:7)

autopep8 is not working on Mac in Atom. I'm getting a red x at the bottom of the screen.

Hey I guys, I'm really hoping someone can help me out. I've been trying to figure this out for 2 days now and I've felt like punching my computer... so frustrated. It's certainly my fault but I don't know enough about it to troubleshoot.

I'm trying to use autopep8 in Atom on mac. I've installed autopep8 using sudo pip3 install autopep8 but the install path seems to be wrong. It's currently installed at /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages which I think is wrong. I know how to uninstall but I don't know how to choose the install location, nor do I know where it's supposed to be installed. I've tried pointing Atom to this directory under the settings for the autopep8 plugin but it has not worked. I've uninstalled and reinstalled more times than i can count, I've tried moving the files to a different directory, I've gone through all of the troubleshooting stuff I can find. I just have no idea what I'm supposed to do. I can provide any information needed to fix this problem, I just don't know what's needed. Please just let me know what I need to attach and I will get it. Thank you to anybody who can help me.

Some way to specify ignore-errors

Like the much-hated and useless E129. I would love something similar to what's provided in atom-pep8, as an ability to ignore specific PEP8 errors.

Failed to activate the python-autopep8 package

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.58.0 x64
Electron: 9.4.4
OS: Microsoft Windows 10 Home
Thrown From: python-autopep8 package 0.1.3

Stack Trace

Failed to activate the python-autopep8 package

At Cannot find module 'C:\Users\user-PC\.atom\packages\python-autopep8\node_modules\jquery\dist\jquery.js'. Please verify that the package.json has a valid "main" entry

Error: Cannot find module 'C:\Users\user-PC\.atom\packages\python-autopep8\node_modules\jquery\dist\jquery.js'. Please verify that the package.json has a valid "main" entry
    at tryPackage (internal/modules/cjs/loader.js:301:19)
    at Function.Module._findPath (internal/modules/cjs/loader.js:532:18)
    at Module._resolveFilename (internal/modules/cjs/loader.js:784:27)
    at o._resolveFilename (electron/js2c/renderer_init.js:43:689)
    at Function.get_Module._resolveFilename (~/AppData/Local/atom/app-1.58.0/resources/app/static/<embedded>:11:157920)
    at Module.require (/app.asar/static/index.js:61:43)
    at require (~/AppData/Local/atom/app-1.58.0/resources/app/static/<embedded>:11:149207)
    at /packages/python-autopep8/lib/python-autopep8.coffee:1:5)
    at /packages/python-autopep8/lib/python-autopep8.coffee:1:1)
    at /packages/python-autopep8/lib/python-autopep8.coffee:1:1)
    at Module.get_Module._compile (~/AppData/Local/atom/app-1.58.0/resources/app/static/<embedded>:11:149891)
    at Object.value [as .coffee] (~/AppData/Local/atom/app-1.58.0/resources/app/static/<embedded>:11:153485)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module._load (electron/js2c/asar.js:769:28)
    at Module.require (/app.asar/static/index.js:72:46)
    at require (~/AppData/Local/atom/app-1.58.0/resources/app/static/<embedded>:11:149207)
    at /packages/python-autopep8/lib/index.coffee:1:18)
    at /packages/python-autopep8/lib/index.coffee:1:1)
    at /packages/python-autopep8/lib/index.coffee:1:1)
    at Module.get_Module._compile (~/AppData/Local/atom/app-1.58.0/resources/app/static/<embedded>:11:149891)
    at Object.value [as .coffee] (~/AppData/Local/atom/app-1.58.0/resources/app/static/<embedded>:11:153485)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module._load (electron/js2c/asar.js:769:28)
    at Module.require (/app.asar/static/index.js:72:46)
    at require (internal/modules/cjs/helpers.js:74:18)
    at customRequire (~/AppData/Local/atom/app-1.58.0/resources/app/static/<embedded>:1:802772)
    at requireModule (~/AppData/Local/atom/app-1.58.0/resources/app/static/<embedded>:14:1195622)
    at Package.requireMainModule (~/AppData/Local/atom/app-1.58.0/resources/app/static/<embedded>:11:3520513)

Commands

  4x -4:48 core:move-left (input.hidden-input)
  2x -4:46.9.0 core:backspace (input.hidden-input)
     -1:04.8.0 core:paste (div.placeholder-text)
     -0:28.1.0 core:backspace (input.hidden-input)

Non-Core Packages

autocomplete-python 1.17.0 
busy-signal 2.0.1 
file-icons 2.1.47 
intentions 2.1.1 
linter 3.4.0 
linter-flake8 2.4.0 
linter-ui-default 3.4.1 
predawn-syntax 1.0.4 
python-autopep8 0.1.3 
script 3.32.2 

import rearrangement

I have a problem that I need to import some modules not at the beginning of the module.
The autopep8 is always rearranging them to the top which is not correct.
I thought that it should not do the correction in this cases or there should be an option to disable this correction.
Thanks a lot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.