src/eric7/QScintilla/DocstringGenerator/BaseDocstringGenerator.py

branch
eric7
changeset 10069
435cc5875135
parent 9653
e67609152c5e
child 10078
9ebe2183cf49
equal deleted inserted replaced
10068:7febcdccb2a1 10069:435cc5875135
47 @param editor reference to the editor widget 47 @param editor reference to the editor widget
48 @type Editor 48 @type Editor
49 """ 49 """
50 self.editor = editor 50 self.editor = editor
51 51
52 def isFunctionStart(self, text): 52 def isFunctionStart(self, text): # noqa: U100
53 """ 53 """
54 Public method to test, if a text is the start of a function or method 54 Public method to test, if a text is the start of a function or method
55 definition. 55 definition.
56 56
57 @param text line of text to be tested 57 @param text line of text to be tested
60 method definition (always False) 60 method definition (always False)
61 @rtype bool 61 @rtype bool
62 """ 62 """
63 return False 63 return False
64 64
65 def hasFunctionDefinition(self, cursorPosition): 65 def hasFunctionDefinition(self, cursorPosition): # noqa: U100
66 """ 66 """
67 Public method to test, if the cursor is right below a function 67 Public method to test, if the cursor is right below a function
68 definition. 68 definition.
69 69
70 @param cursorPosition current cursor position (line and column) 70 @param cursorPosition current cursor position (line and column)
72 @return flag indicating cursor is right below a function definition 72 @return flag indicating cursor is right below a function definition
73 @rtype bool 73 @rtype bool
74 """ 74 """
75 return False 75 return False
76 76
77 def isDocstringIntro(self, cursorPosition): 77 def isDocstringIntro(self, cursorPosition): # noqa: U100
78 """ 78 """
79 Public function to test, if the line up to the cursor position might be 79 Public function to test, if the line up to the cursor position might be
80 introducing a docstring. 80 introducing a docstring.
81 81
82 @param cursorPosition current cursor position (line and column) 82 @param cursorPosition current cursor position (line and column)
84 @return flag indicating a potential start of a docstring 84 @return flag indicating a potential start of a docstring
85 @rtype bool 85 @rtype bool
86 """ 86 """
87 return False 87 return False
88 88
89 def insertDocstring(self, cursorPosition, fromStart=True): 89 def insertDocstring(self, cursorPosition, fromStart=True): # noqa: U100
90 """ 90 """
91 Public method to insert a docstring for the function at the cursor 91 Public method to insert a docstring for the function at the cursor
92 position. 92 position.
93 93
94 @param cursorPosition position of the cursor (line and index) 94 @param cursorPosition position of the cursor (line and index)
98 @type bool 98 @type bool
99 """ 99 """
100 # just do nothing in the base class 100 # just do nothing in the base class
101 return 101 return
102 102
103 def insertDocstringFromShortcut(self, cursorPosition): 103 def insertDocstringFromShortcut(self, cursorPosition): # noqa: U100
104 """ 104 """
105 Public method to insert a docstring for the function at the cursor 105 Public method to insert a docstring for the function at the cursor
106 position initiated via a keyboard shortcut. 106 position initiated via a keyboard shortcut.
107 107
108 @param cursorPosition position of the cursor (line and index) 108 @param cursorPosition position of the cursor (line and index)

eric ide

mercurial