src/eric7/Documentation/Source/eric7.CodeFormatting.BlackConfigurationDialog.html

branch
eric7
changeset 9215
30d7f7fd2b4a
child 9338
e7e6c61805cf
equal deleted inserted replaced
9214:bd28e56047d7 9215:30d7f7fd2b4a
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric7.CodeFormatting.BlackConfigurationDialog</title>
4 <meta charset="UTF-8">
5 <link rel="stylesheet" href="styles.css">
6 </head>
7 <body>
8 <a NAME="top" ID="top"></a>
9 <h1>eric7.CodeFormatting.BlackConfigurationDialog</h1>
10
11 <p>
12 Module implementing a dialog to enter the parameters for a Black formatting run.
13 </p>
14 <h3>Global Attributes</h3>
15
16 <table>
17 <tr><td>None</td></tr>
18 </table>
19 <h3>Classes</h3>
20
21 <table>
22
23 <tr>
24 <td><a href="#BlackConfigurationDialog">BlackConfigurationDialog</a></td>
25 <td>Class implementing a dialog to enter the parameters for a Black formatting run.</td>
26 </tr>
27 </table>
28 <h3>Functions</h3>
29
30 <table>
31 <tr><td>None</td></tr>
32 </table>
33 <hr />
34 <hr />
35 <a NAME="BlackConfigurationDialog" ID="BlackConfigurationDialog"></a>
36 <h2>BlackConfigurationDialog</h2>
37
38 <p>
39 Class implementing a dialog to enter the parameters for a Black formatting run.
40 </p>
41 <h3>Derived from</h3>
42 QDialog, Ui_BlackConfigurationDialog
43 <h3>Class Attributes</h3>
44
45 <table>
46 <tr><td>None</td></tr>
47 </table>
48 <h3>Class Methods</h3>
49
50 <table>
51 <tr><td>None</td></tr>
52 </table>
53 <h3>Methods</h3>
54
55 <table>
56
57 <tr>
58 <td><a href="#BlackConfigurationDialog.__init__">BlackConfigurationDialog</a></td>
59 <td>Constructor</td>
60 </tr>
61 <tr>
62 <td><a href="#BlackConfigurationDialog.__createTomlSnippet">__createTomlSnippet</a></td>
63 <td>Private slot to generate a TOML snippet of the current configuration.</td>
64 </tr>
65 <tr>
66 <td><a href="#BlackConfigurationDialog.__getTargetList">__getTargetList</a></td>
67 <td>Private method to get the list of checked target versions.</td>
68 </tr>
69 <tr>
70 <td><a href="#BlackConfigurationDialog.__loadConfiguration">__loadConfiguration</a></td>
71 <td>Private method to load the configuration section with data of the given dictionary.</td>
72 </tr>
73 <tr>
74 <td><a href="#BlackConfigurationDialog.__populateTargetVersionsList">__populateTargetVersionsList</a></td>
75 <td>Private method to populate the target versions list widget with checkable Python version entries.</td>
76 </tr>
77 <tr>
78 <td><a href="#BlackConfigurationDialog.getConfiguration">getConfiguration</a></td>
79 <td>Public method to get the current configuration parameters.</td>
80 </tr>
81 <tr>
82 <td><a href="#BlackConfigurationDialog.on_excludeEdit_textChanged">on_excludeEdit_textChanged</a></td>
83 <td>Private slot to enable the validate button depending on the exclude text.</td>
84 </tr>
85 <tr>
86 <td><a href="#BlackConfigurationDialog.on_sourceComboBox_currentTextChanged">on_sourceComboBox_currentTextChanged</a></td>
87 <td>Private slot to handle the selection of a configuration source.</td>
88 </tr>
89 <tr>
90 <td><a href="#BlackConfigurationDialog.on_validateButton_clicked">on_validateButton_clicked</a></td>
91 <td>Private slot to validate the entered exclusion regular expression.</td>
92 </tr>
93 </table>
94 <h3>Static Methods</h3>
95
96 <table>
97 <tr><td>None</td></tr>
98 </table>
99
100 <a NAME="BlackConfigurationDialog.__init__" ID="BlackConfigurationDialog.__init__"></a>
101 <h4>BlackConfigurationDialog (Constructor)</h4>
102 <b>BlackConfigurationDialog</b>(<i>withProject=True, parent=None</i>)
103
104 <p>
105 Constructor
106 </p>
107 <dl>
108
109 <dt><i>withProject</i> (bool)</dt>
110 <dd>
111 flag indicating to look for project configurations
112 (defaults to True)
113 </dd>
114 <dt><i>parent</i> (QWidget (optional))</dt>
115 <dd>
116 reference to the parent widget (defaults to None)
117 </dd>
118 </dl>
119 <a NAME="BlackConfigurationDialog.__createTomlSnippet" ID="BlackConfigurationDialog.__createTomlSnippet"></a>
120 <h4>BlackConfigurationDialog.__createTomlSnippet</h4>
121 <b>__createTomlSnippet</b>(<i></i>)
122
123 <p>
124 Private slot to generate a TOML snippet of the current configuration.
125 </p>
126 <p>
127 Note: Only non-default values are included in this snippet.
128 </p>
129 <p>
130 The code snippet is copied to the clipboard and may be placed inside the
131 'pyproject.toml' file.
132 </p>
133 <a NAME="BlackConfigurationDialog.__getTargetList" ID="BlackConfigurationDialog.__getTargetList"></a>
134 <h4>BlackConfigurationDialog.__getTargetList</h4>
135 <b>__getTargetList</b>(<i></i>)
136
137 <p>
138 Private method to get the list of checked target versions.
139 </p>
140 <dl>
141 <dt>Return:</dt>
142 <dd>
143 list of target versions
144 </dd>
145 </dl>
146 <dl>
147 <dt>Return Type:</dt>
148 <dd>
149 list of str
150 </dd>
151 </dl>
152 <a NAME="BlackConfigurationDialog.__loadConfiguration" ID="BlackConfigurationDialog.__loadConfiguration"></a>
153 <h4>BlackConfigurationDialog.__loadConfiguration</h4>
154 <b>__loadConfiguration</b>(<i>configurationDict</i>)
155
156 <p>
157 Private method to load the configuration section with data of the given
158 dictionary.
159 </p>
160 <dl>
161
162 <dt><i>configurationDict</i> (dict)</dt>
163 <dd>
164 reference to the data to be loaded
165 </dd>
166 </dl>
167 <a NAME="BlackConfigurationDialog.__populateTargetVersionsList" ID="BlackConfigurationDialog.__populateTargetVersionsList"></a>
168 <h4>BlackConfigurationDialog.__populateTargetVersionsList</h4>
169 <b>__populateTargetVersionsList</b>(<i></i>)
170
171 <p>
172 Private method to populate the target versions list widget with checkable
173 Python version entries.
174 </p>
175 <a NAME="BlackConfigurationDialog.getConfiguration" ID="BlackConfigurationDialog.getConfiguration"></a>
176 <h4>BlackConfigurationDialog.getConfiguration</h4>
177 <b>getConfiguration</b>(<i></i>)
178
179 <p>
180 Public method to get the current configuration parameters.
181 </p>
182 <dl>
183 <dt>Return:</dt>
184 <dd>
185 dictionary containing the configuration parameters
186 </dd>
187 </dl>
188 <dl>
189 <dt>Return Type:</dt>
190 <dd>
191 dict
192 </dd>
193 </dl>
194 <a NAME="BlackConfigurationDialog.on_excludeEdit_textChanged" ID="BlackConfigurationDialog.on_excludeEdit_textChanged"></a>
195 <h4>BlackConfigurationDialog.on_excludeEdit_textChanged</h4>
196 <b>on_excludeEdit_textChanged</b>(<i></i>)
197
198 <p>
199 Private slot to enable the validate button depending on the exclude text.
200 </p>
201 <a NAME="BlackConfigurationDialog.on_sourceComboBox_currentTextChanged" ID="BlackConfigurationDialog.on_sourceComboBox_currentTextChanged"></a>
202 <h4>BlackConfigurationDialog.on_sourceComboBox_currentTextChanged</h4>
203 <b>on_sourceComboBox_currentTextChanged</b>(<i>selection</i>)
204
205 <p>
206 Private slot to handle the selection of a configuration source.
207 </p>
208 <dl>
209
210 <dt><i>selection</i> (str)</dt>
211 <dd>
212 text of the currently selected item
213 </dd>
214 </dl>
215 <a NAME="BlackConfigurationDialog.on_validateButton_clicked" ID="BlackConfigurationDialog.on_validateButton_clicked"></a>
216 <h4>BlackConfigurationDialog.on_validateButton_clicked</h4>
217 <b>on_validateButton_clicked</b>(<i></i>)
218
219 <p>
220 Private slot to validate the entered exclusion regular expression.
221 </p>
222 <div align="right"><a href="#top">Up</a></div>
223 <hr />
224 </body></html>

eric ide

mercurial