GithubHelp home page GithubHelp logo

Comments (4)

z33kz33k avatar z33kz33k commented on June 12, 2024 2

In my case, as can be seen below, Returns section doesn't get generated if the current cursor location is on a proper level of indentation (inside the functions's block), but it gets generated if it's on an improper level of indentation (outside of the function's block, e.g. at a class' or module's level).

Version: 1.31.1 (system setup)
Commit: 1b8e8302e405050205e69b59abb3559592bb9e60
Date: 2019-02-12T02:20:54.427Z
Electron: 3.1.2
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 6.1.7601

autodocstring 0.2.3

Platform: Windows 7 64-bit

from autodocstring.

Hypdncy avatar Hypdncy commented on June 12, 2024

Hello auth:
def test1(msg):
    |index1
return msg
def test2(msg):
|index2
return msg
when I use "ctrl+shift+2" in index1,I can't see return
but I use "ctrl+shift+2" in index2,I can see return
It is not comfortable
I can't speak English,sorry!

from autodocstring.

KaOzPoNs avatar KaOzPoNs commented on June 12, 2024

Hi, i have the same problem... it looks that other """ comments """ affect the correct detection of the docstring...

i have the next function:

def get_db_size(array,bytekey,datatypekey):  
      
    for eachdb in array:
        seq,length = [x[bytekey] for x in eachdb],[x[datatypekey] for x in eachdb]
        floatseq = map(float, seq)
        idx = floatseq.index(max(floatseq))
        lastByte = int(max(floatseq))+(offsets[length[idx]])
        print eachdb
        """ 
        print "seq:%s"%type(seq) 
        print seq
        """
    return lastByte

and when i use the keyboard shortcut, i only get this docString:

"""get_db_size [summary]
      
      [description]
      
      Args:
          array ([type]): [description]
          bytekey ([type]): [description]
          datatypekey ([type]): [description]
      """

without "return"... but... if i remove:

""" 
        print "seq:%s"%type(seq) 
        print seq
        """

then i can get the full docstring:

"""get_db_size [summary]

[description]

Args:
    array ([type]): [description]
    bytekey ([type]): [description]
    datatypekey ([type]): [description]

Returns:
    [type]: [description]
"""

from autodocstring.

HaaLeo avatar HaaLeo commented on June 12, 2024

@z33kz33k @NilsJPWerner This happens only when using CRLF if you use LF it works on indentation level as well. The cause of this behaviour is that indentationOf() returns "one to much" e.g. 5 instead of 4 for CRLF.

from autodocstring.

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.