Closed sudoforge closed 8 years ago
i'm having the same problem, but i'm trying to add w191 to "ignore", because i like to use tabs and it keeps changing to 4 spaces. If anyone know a fix pls tell
@Tuganazy original autopep8 ignores W191 but tries to fix E101(indentation contains mixed spaces and tabs) and E111(indentation is not a multiple of four). You have to ignore these errors(E101,E111) as well to prevent converting tabs to spaces. More information here: autopep8 features, pep8 error codes.
i added all E1?? and it didn't work. also tried to all E401 to ignore imports in multiple lines and it keeps fixing it.
@bddenhartog thank you for your detailed feedback. I've created separate issue to handle keymap overriding(#39).
User's settings file should override default plugin's setting though.
The parameter indent-size
should work for any for ... in
, def fun():
and other statements.
To make it work for such objects as dict
or list
you should ignore E121(continuation line under-indented for hanging indent) error.
More information is here: pep8 error codes
@wistful, there you go https://gist.github.com/Tuganazy/7352d87b4370d323bd09 i'm just testing with: def asd(): return
and on the return line it swapes my tab by 4 spaces.
@Tuganazy, works for me with your config in ST2 and ST3. May be other plugin overrides tabs with spaces, or it might be sublime's settings.
i use CTRL+8 to preview , so i don't think its another plugin. You know what settings could be messing it up?
Probably it's SublimeAutoPEP8
in this case.
Which settings have you changed: default or user? Plugin uses default settings and then overrides it with user settings.
@Tuganazy, please provide which version of sublime do you use(Help -> About Sublime Text) and which version of SublimeAutoPEP8 has been installed(Package Control -> List Package)
autopep8 v1.3 ST3 build 3083
the gist that i linked is what i have in the autopep8 > settings - user (default also doesn't let me edit it) it just looks like its not even loading the settings, i also tested the line lenght and i also doesn't work
@Tuganazy, could you please post your logs: 1) Restart ST3 2) Open SublimeAutoPEP8 user settings 3) Save the settings 4) Open Console(View -> Show Console) 5) Copy logs and post it on gist or other service
@Tuganazy, I see that AutoPep8 plugin is loaded, but there is no records about reloading settings.
The line reloading Packages/User/AutoPep8.sublime-settings
should appear in the console if you open AutoPep8 User Settings and save the file(even if there are no changes).
@wistful Can you tell me how can i do a manual installation of the plugin? Maybe something i going wrong while installing
@Tuganazy, please follow next steps:
update the plugin to the latest version 1.3.1
add new option "debug": true
to the User config
restart sublime text
run preview
or format
command on your file
copy all logs from the output console and put it with python code example here or into gist.
hi, wistful. I have this problem also. my version is ST3, mac os x, autopep3 version is 1.3.1. when I install bypackage control
. tell me No such file or directionay. like `,I install manual, can edit
AutoPep8.sublime-settings` but can not format. hope reply. thanks
@liujb, could you please provide output from the ST3 console and path of not found path/directory?
I am having a similar problem. Having changed max_line_length in User settings to 200, the plugin still shows E501 errors for a line that is just longer than 79 characters.
Setting the debug=true flag seems shows that the new config is picked up, however it doesn't seem to apply it.
ST3 console debug:
plugin: version=1.3.1
config: {'aggressive': 0, 'avoid_new_line_in_select_mode': False, 'list-fixes': '',
'file_menu_search_depth': 3, 'select': '', 'format_on_save': False, 'indent-size': 4,
'debug': True, 'max-line-length': 200, 'ignore': 'E501', 'syntax_list': ['Python']}
I also tried adding E501 to the list of ignored errors, but to no avail.
Screenshot of code line with E501 error in status bar.
@sandeepklr, SublimeAutoPEP8
plugin doesn't highlight pep8 errors and warnings but only formats code. I'd suggest to take a look at other plugins.
Fixed in dev version: v1.3.2-rc2.
Fixed in stable version: v1.3.2.
Installing the package through Package Control does not unpack the package into
Packages/
, it simply leaves it inInstalled_Packages/
.This causes a few issues:
Packages/User/AutoPep8.sublime-settings
) should work, right? Nope -- it seems to be entirely ignored. As you can see from the attached image, the settings file (left window) has the option"indent-size": 2
; however the preview shows an indent of 4 spaces (and the content is indented to four spaces when running instead of previewing).In this quick example replicating the issue, I left braces around the list (the original object was a dictionary, but values were removed). This is not the cause of the issue.