Code Monkey home page Code Monkey logo

spyder-autopep8's Introduction

spyder-autopep8

Important Notes

  • This plugin is no longer maintained but you can still use with Spyder 3 (see below).
  • This plugin is incompatible with Spyder 4. However, auto-formatting was added to Spyder 4.2.0 (released in November 2020).
  • To auto-format a file or selection in Spyder 4.2.0, you need to go to the menu Source > Format file or selection or press the shortcut Ctrl + Alt + I (Cmd + Alt + I in macOS).

Description

This is a plugin to run the Autopep8 Python linter from within the Python IDE Spyder version 3.

Requirements

spyder==3
autopep8

Install instructions

See https://github.com/spyder-ide/spyder/wiki/User-plugins. You can only install this plugin from source and with any version of Spyder 3.

Usage

Press Shift+F8 (default) to run autopep8 on the current file or go to Source > Run autopep8 code autoformatting.

If some text is selected, autopep8 will run on this text only.

Informations about the execution will be displayed in the statusbar.

Screenshot

Autopep8 preferences:

image

spyder-autopep8's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spyder-autopep8's Issues

Plugin not loading

This plugin is not loaded on spyder startup.

Maybe because it's installed under the wrong path? On my machine the files are located in
site-packages/spyplugins but i thing the correct place would be site-packages/spyderplugins.

spyplugins/ui/autopep8/__init__.py needs quote on version string

spyplugins/ui/autopep8/init.py may need adjustment, I had to put quotes around the version string.

Got this error on install otherwise:

File ".local/lib/python2.7/site-packages/spyder.autopep8-0.0.1-py2.7.egg/spyplugins/ui/autopep8/init.py", line 1
version = 0.0.1
^
SyntaxError: invalid syntax

fixed by changing to version = "0.0.1"

switch windows layout ERROR

@lianzhaowen commented on Tue Dec 12 2017

Description

What steps will reproduce the problem?

  1. view - windows layouts - any layout

What is the expected output? What do you see instead?

Please provide any additional information below

File "d:\software\python\python36\lib\site-packages\spyder\app\mainwindow.py", line 1769, in
return lambda: self.quick_layout_switch(i)
File "d:\software\python\python36\lib\site-packages\spyder\app\mainwindow.py", line 1889, in quick_layout_switch
self.setup_default_layouts(index, settings)
File "d:\software\python\python36\lib\site-packages\spyder\app\mainwindow.py", line 1614, in setup_default_layouts
widget.toggle_view(True)
File "d:\software\python\python36\lib\site-packages\spyder\plugins_init_.py", line 524, in toggle_view
self.dockwidget.show()
AttributeError: 'DummyDock' object has no attribute 'show'

Version and main components

  • Spyder Version: 3.2.4
  • Python Version: 3.6.3
  • Qt Versions: 5.9.3, PyQt5 5.9.2 on Windows

Dependencies

pyflakes >=0.6.0 :  1.6.0 (OK)
pycodestyle >=2.3:  2.3.1 (OK)
pygments >=2.0   :  2.2.0 (OK)
pandas >=0.13.1  :  0.21.0 (OK)
numpy >=1.7      :  1.13.3 (OK)
sphinx >=0.6.6   :  1.6.5 (OK)
rope >=0.9.4     :  0.10.7 (OK)
jedi >=0.9.0     :  0.11.0 (OK)
nbconvert >=4.0  :  5.3.1 (OK)
sympy >=0.7.3    :  1.1

@ccordoba12 commented on Tue Dec 12 2017

We don't have an object called DummyDock in our entire codebase. Do you other, third-party Spyder plugins installed?


@lianzhaowen commented on Tue Dec 12 2017

only spyder.autopep8

when i uninstall it, that's ok!


@ccordoba12 commented on Tue Dec 12 2017

Ok, I'm moving this issue to its repo then. Unfortunately, we don't have funding right now, so we don't plan to solve it for the moment.

Update pypi version

@goanpeca, I think that you did it the first time. Is there some procedure to update the package on pypi ?
I think we'll have to be more strict on the version numbers and stable branches.

Can't install spyder-autopep8

kraamis@debian [~]$ sudo pip3 install spyder.autopep8
Collecting spyder.autopep8
Could not find a version that satisfies the requirement spyder.autopep8 (from versions: )
No matching distribution found for spyder.autopep8

On pypi.org install link absent on module page.

Spyder can't load spyder_autopep8 all of a sudden

Description

What steps will reproduce the problem?

  1. Put the spyder_autopep8 plugin in the plugins folder
  2. Open spyder

What is the expected output? What do you see instead?
Literally nothing. Other than the program opening and then spyder loading the plugin successfully, which I was able to do last week before Windows 10 was installed.

Please provide any additional information below

    module = _import_module_from_path(module_name, plugin_path)
    module = spec.loader.load_module(module_name)
AttributeError: 'NoneType' object has no attribute 'load_module'

Version and main components

  • Spyder Version: 3.2.6
  • Python Version: 3.6.4
  • Qt Versions: 5.6.2, PyQt5 5.6 on Windows

Dependencies

pyflakes >=0.6.0 :  1.6.0 (OK)
pycodestyle >=2.3:  2.3.1 (OK)
pygments >=2.0   :  2.2.0 (OK)
pandas >=0.13.1  :  0.22.0 (OK)
numpy >=1.7      :  1.14.0 (OK)
sphinx >=0.6.6   :  1.6.6 (OK)
rope >=0.9.4     :  0.10.7 (OK)
jedi >=0.9.0     :  0.11.1 (OK)
nbconvert >=4.0  :  5.3.1 (OK)
sympy >=0.7.3    :  1.1.1 (OK)
cython >=0.21    :  0.27.3 (OK)
qtconsole >=4.2.0:  4.3.1 (OK)
IPython >=4.0    :  6.2.1 (OK)
pylint >=0.25    :  1.8.2 (OK)

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.