wistful / SublimeAutoPEP8

Automatically formats Python code to conform to the PEP 8 style guide using autopep8 and pep8 modules
144 stars 23 forks source link

I have some problem with the latest update about Sort Import #62

Closed Erimus-Koo closed 5 years ago

Erimus-Koo commented 5 years ago

After latest update, there's some change about import.

I have a header part like this:

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'Erimus'

'''
根据m.weibo.cn获取关注人列表  
some description~~
'''
# some moudle
import pymongo

# this part append sys path
import os
import sys
if os.name == 'nt':
    root = 'D:/OneDrive/'  # PC
else:
    root = '/Users/Erimus/OneDrive/'  # MAC
sys.path.append(root + '05ProgramProject/Python/')

# this moudle is in the sys path
from erimus_toolbox import *

After latest update, the last part import had been move to the top, before the sys path append, so failed.
And the description part had been move down, I wish it be at top to explain current file.

How should I do with this?
Or, is that some way to ignore several conditions?
I tried write setting:

{
    "ignore": ["E501","E402"]
}

but not work. I can only ignore one of it.
Please help.

Erimus-Koo commented 5 years ago

I got it.

The setting should write as

{
    "ignore": "E501, E402"
}