src/eric7/QScintilla/DocstringGenerator/BaseDocstringGenerator.py

branch
eric7
changeset 10683
779cda568acb
parent 10665
66564661c3b5
child 11090
f5f5f5803935
equal deleted inserted replaced
10682:47be220abdaf 10683:779cda568acb
53 def isFunctionStart(self, text): # noqa: U100 53 def isFunctionStart(self, text): # noqa: U100
54 """ 54 """
55 Public method to test, if a text is the start of a function or method 55 Public method to test, if a text is the start of a function or method
56 definition. 56 definition.
57 57
58 @param text line of text to be tested 58 @param text line of text to be tested (unused)
59 @type str 59 @type str
60 @return flag indicating that the given text starts a function or 60 @return flag indicating that the given text starts a function or
61 method definition (always False) 61 method definition (always False)
62 @rtype bool 62 @rtype bool
63 """ 63 """
66 def hasFunctionDefinition(self, cursorPosition): # noqa: U100 66 def hasFunctionDefinition(self, cursorPosition): # noqa: U100
67 """ 67 """
68 Public method to test, if the cursor is right below a function 68 Public method to test, if the cursor is right below a function
69 definition. 69 definition.
70 70
71 @param cursorPosition current cursor position (line and column) 71 @param cursorPosition current cursor position (line and column) (unused)
72 @type tuple of (int, int) 72 @type tuple of (int, int)
73 @return flag indicating cursor is right below a function definition 73 @return flag indicating cursor is right below a function definition
74 @rtype bool 74 @rtype bool
75 """ 75 """
76 return False 76 return False
78 def isDocstringIntro(self, cursorPosition): # noqa: U100 78 def isDocstringIntro(self, cursorPosition): # noqa: U100
79 """ 79 """
80 Public function to test, if the line up to the cursor position might be 80 Public function to test, if the line up to the cursor position might be
81 introducing a docstring. 81 introducing a docstring.
82 82
83 @param cursorPosition current cursor position (line and column) 83 @param cursorPosition current cursor position (line and column) (unused)
84 @type tuple of (int, int) 84 @type tuple of (int, int)
85 @return flag indicating a potential start of a docstring 85 @return flag indicating a potential start of a docstring
86 @rtype bool 86 @rtype bool
87 """ 87 """
88 return False 88 return False
90 def insertDocstring(self, cursorPosition, fromStart=True): # noqa: U100 90 def insertDocstring(self, cursorPosition, fromStart=True): # noqa: U100
91 """ 91 """
92 Public method to insert a docstring for the function at the cursor 92 Public method to insert a docstring for the function at the cursor
93 position. 93 position.
94 94
95 @param cursorPosition position of the cursor (line and index) 95 @param cursorPosition position of the cursor (line and index) (unused)
96 @type tuple of (int, int) 96 @type tuple of (int, int)
97 @param fromStart flag indicating that the editor text cursor is placed 97 @param fromStart flag indicating that the editor text cursor is placed
98 on the line starting the function definition 98 on the line starting the function definition (unused)
99 @type bool 99 @type bool
100 """ 100 """
101 # just do nothing in the base class 101 # just do nothing in the base class
102 return 102 return
103 103
104 def insertDocstringFromShortcut(self, cursorPosition): # noqa: U100 104 def insertDocstringFromShortcut(self, cursorPosition): # noqa: U100
105 """ 105 """
106 Public method to insert a docstring for the function at the cursor 106 Public method to insert a docstring for the function at the cursor
107 position initiated via a keyboard shortcut. 107 position initiated via a keyboard shortcut.
108 108
109 @param cursorPosition position of the cursor (line and index) 109 @param cursorPosition position of the cursor (line and index) (unused)
110 @type tuple of (int, int) 110 @type tuple of (int, int)
111 """ 111 """
112 # just do nothing in the base class 112 # just do nothing in the base class
113 return 113 return
114 114

eric ide

mercurial