Git Product home page Git Product logo

Comments (3)

AndreasBackx avatar AndreasBackx commented on June 9, 2024

Okay, after noticing that ST adds a fourth " when typing """ resulting in """" but does not do it for single quotes. (''' remains ''''). It seems that the expected behaviour does occur. It is however odd that when pressing the enter key after the third double quote in """" generates:

def foo(bar):
    """"
    
    [description]
    
    Args:
        bar: [description]
    """

It keeps the four double quotes and does not generate the summary. I'm not sure whether there is a conflict somewhere between my packages. Could you perhaps test whether this is the case with your Sublime Text installation?

from sublime_docblockr_python.

adambullmer avatar adambullmer commented on June 9, 2024

I'd venture a guess that it's parsing the 4th " as the summary line, and automatically replaces that into the snipped segment, leading to the unexpected behavior like you're describing.

At present, this: (where | is the cursor)

def foo():
    """|Testing

Should result in this, where your initial line is preserved:

def foo():
    """Testing

    [description]
    """

As to why it's not working with the single quotes, I think my keymap is only for double quotes. I think this was an effort to enforce adhering to PEP0257, which states to only use triple double quotes.

Lastly about the quad-quote, You might have an additional plugin that is causing that behavior. I'm running pretty bare metal on the python plugins, and i'm not experiencing anything like that. You might try disabling them to try and give a confirmation on that.

from sublime_docblockr_python.

AndreasBackx avatar AndreasBackx commented on June 9, 2024

@adambullmer thank you for the swift reply. I wasn't referring to the triple single quotes that wasn't working as I use double quotes for docstrings. I guess I'll have a look at which package causes the troubles.

from sublime_docblockr_python.

Related Issues (20)

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.