kiteco / issue-tracker

User-reported issues for Kite
https://Kite.com
1.76k stars 136 forks source link

make Python completions compliant with PEP8 #475

Open Aeronas opened 3 years ago

Aeronas commented 3 years ago

I have Kite Pro and currently whenever using the auto-complete for multi-line actions there is only the default way each is completed and I do not see any way to edit how these are changed.

For example, writing in Python using SublimeText when I start a line with the word class the obvious auto-complete appears. But when I select it, it writes the next few lines of code with a super().init and no line space between the docstring and the init method. Every time anaconda is giving me a notice that PEP8 expects there to be an empty line between docstring and first method, and besides that it is how I like to write my code anyway.

class auto-complete now:

class ClassName(object):
    """docstring for ClassName"""
    def __init__(self, arg):
        super(ClassName, self).__init__()
        self.arg = arg

class auto-complete as I would like it:

class ClassName(object):
    """docstring for ClassName"""

    def __init__(self, arg):
        self.arg = arg

Is there a way to edit these settings and what multi-line auto-completes will write?? And if not, can the option be added? There's not a lot of use paying so much for the option and having to change it all after it completes anyway.

itsdhung commented 3 years ago

Hi @Aeronas, curious if simply disabling these multiline completions would be sufficient for you?

Doing some postprocessing to figure out how to format these completions to be tailored to an individual user's preference may be out of scope for us.

Aeronas commented 3 years ago

Well @its-dhung if the auto-complete does not even do the bare minimum of following PEP8 standards, why on earth am I spending $20 a month just to disable the primary reason for having it??

It said this entry failed, so I wrote another one that will be coming through with code examples. The program does well in letting you quickly edit out the super method, but changing a valid optional method and changing a Python code standard best-practice without the auto-tab even moving to the option are two very different things.

Aeronas commented 3 years ago

PEP8 - E308 Blank Lines

image

image

Specifically this guideline, the added whitespace at the end of class auto-complete is incorrect as well but most text editors take care of that on their own.

I can definitely understand how adding an entire settings menu for every Tom and Sally to make up their own auto-completes that work over the incredible amount of IDEs and Editors that Kite is compatible with is quite a lot to ask for, but keeping up with industry standards feels like a fair request for a paid-for service that costs what 2-3 entire streaming services do combined.