5 <link rel="stylesheet" href="styles.css"> |
5 <link rel="stylesheet" href="styles.css"> |
6 </head> |
6 </head> |
7 <body> |
7 <body> |
8 <a NAME="top" ID="top"></a> |
8 <a NAME="top" ID="top"></a> |
9 <h1>eric7.CodeFormatting.BlackConfigurationDialog</h1> |
9 <h1>eric7.CodeFormatting.BlackConfigurationDialog</h1> |
10 |
|
11 <p> |
10 <p> |
12 Module implementing a dialog to enter the parameters for a Black formatting run. |
11 Module implementing a dialog to enter the parameters for a Black formatting run. |
13 </p> |
12 </p> |
|
13 |
14 <h3>Global Attributes</h3> |
14 <h3>Global Attributes</h3> |
15 |
15 <table> |
16 <table> |
16 <tr><td>None</td></tr> |
17 <tr><td>None</td></tr> |
17 </table> |
18 </table> |
18 |
19 <h3>Classes</h3> |
19 <h3>Classes</h3> |
20 |
20 <table> |
21 <table> |
|
22 |
|
23 <tr> |
21 <tr> |
24 <td><a href="#BlackConfigurationDialog">BlackConfigurationDialog</a></td> |
22 <td><a href="#BlackConfigurationDialog">BlackConfigurationDialog</a></td> |
25 <td>Class implementing a dialog to enter the parameters for a Black formatting run.</td> |
23 <td>Class implementing a dialog to enter the parameters for a Black formatting run.</td> |
26 </tr> |
24 </tr> |
27 </table> |
25 </table> |
|
26 |
28 <h3>Functions</h3> |
27 <h3>Functions</h3> |
29 |
28 <table> |
30 <table> |
29 <tr><td>None</td></tr> |
31 <tr><td>None</td></tr> |
30 </table> |
32 </table> |
31 |
33 <hr /> |
32 <hr /> |
34 <hr /> |
33 <hr /> |
35 <a NAME="BlackConfigurationDialog" ID="BlackConfigurationDialog"></a> |
34 <a NAME="BlackConfigurationDialog" ID="BlackConfigurationDialog"></a> |
36 <h2>BlackConfigurationDialog</h2> |
35 <h2>BlackConfigurationDialog</h2> |
37 |
|
38 <p> |
36 <p> |
39 Class implementing a dialog to enter the parameters for a Black formatting run. |
37 Class implementing a dialog to enter the parameters for a Black formatting run. |
40 </p> |
38 </p> |
|
39 |
41 <h3>Derived from</h3> |
40 <h3>Derived from</h3> |
42 QDialog, Ui_BlackConfigurationDialog |
41 QDialog, Ui_BlackConfigurationDialog |
43 <h3>Class Attributes</h3> |
42 <h3>Class Attributes</h3> |
44 |
43 <table> |
45 <table> |
44 <tr><td>None</td></tr> |
46 <tr><td>None</td></tr> |
45 </table> |
47 </table> |
46 |
48 <h3>Class Methods</h3> |
47 <h3>Class Methods</h3> |
49 |
48 <table> |
50 <table> |
49 <tr><td>None</td></tr> |
51 <tr><td>None</td></tr> |
50 </table> |
52 </table> |
51 |
53 <h3>Methods</h3> |
52 <h3>Methods</h3> |
54 |
53 <table> |
55 <table> |
|
56 |
|
57 <tr> |
54 <tr> |
58 <td><a href="#BlackConfigurationDialog.__init__">BlackConfigurationDialog</a></td> |
55 <td><a href="#BlackConfigurationDialog.__init__">BlackConfigurationDialog</a></td> |
59 <td>Constructor</td> |
56 <td>Constructor</td> |
60 </tr> |
57 </tr> |
61 <tr> |
58 <tr> |
89 <tr> |
86 <tr> |
90 <td><a href="#BlackConfigurationDialog.on_validateButton_clicked">on_validateButton_clicked</a></td> |
87 <td><a href="#BlackConfigurationDialog.on_validateButton_clicked">on_validateButton_clicked</a></td> |
91 <td>Private slot to validate the entered exclusion regular expression.</td> |
88 <td>Private slot to validate the entered exclusion regular expression.</td> |
92 </tr> |
89 </tr> |
93 </table> |
90 </table> |
|
91 |
94 <h3>Static Methods</h3> |
92 <h3>Static Methods</h3> |
95 |
93 <table> |
96 <table> |
94 <tr><td>None</td></tr> |
97 <tr><td>None</td></tr> |
95 </table> |
98 </table> |
96 |
99 |
97 |
100 <a NAME="BlackConfigurationDialog.__init__" ID="BlackConfigurationDialog.__init__"></a> |
98 <a NAME="BlackConfigurationDialog.__init__" ID="BlackConfigurationDialog.__init__"></a> |
101 <h4>BlackConfigurationDialog (Constructor)</h4> |
99 <h4>BlackConfigurationDialog (Constructor)</h4> |
102 <b>BlackConfigurationDialog</b>(<i>withProject=True, onlyProject=False, parent=None</i>) |
100 <b>BlackConfigurationDialog</b>(<i>withProject=True, onlyProject=False, parent=None</i>) |
103 |
|
104 <p> |
101 <p> |
105 Constructor |
102 Constructor |
106 </p> |
103 </p> |
|
104 |
107 <dl> |
105 <dl> |
108 |
106 |
109 <dt><i>withProject</i> (bool (optional))</dt> |
107 <dt><i>withProject</i> (bool (optional))</dt> |
110 <dd> |
108 <dd> |
111 flag indicating to look for project configurations |
109 flag indicating to look for project configurations |
122 </dd> |
120 </dd> |
123 </dl> |
121 </dl> |
124 <a NAME="BlackConfigurationDialog.__createTomlSnippet" ID="BlackConfigurationDialog.__createTomlSnippet"></a> |
122 <a NAME="BlackConfigurationDialog.__createTomlSnippet" ID="BlackConfigurationDialog.__createTomlSnippet"></a> |
125 <h4>BlackConfigurationDialog.__createTomlSnippet</h4> |
123 <h4>BlackConfigurationDialog.__createTomlSnippet</h4> |
126 <b>__createTomlSnippet</b>(<i></i>) |
124 <b>__createTomlSnippet</b>(<i></i>) |
127 |
|
128 <p> |
125 <p> |
129 Private slot to generate a TOML snippet of the current configuration. |
126 Private slot to generate a TOML snippet of the current configuration. |
130 </p> |
127 </p> |
131 <p> |
128 <p> |
132 Note: Only non-default values are included in this snippet. |
129 Note: Only non-default values are included in this snippet. |
133 </p> |
130 </p> |
134 <p> |
131 <p> |
135 The code snippet is copied to the clipboard and may be placed inside the |
132 The code snippet is copied to the clipboard and may be placed inside the |
136 'pyproject.toml' file. |
133 'pyproject.toml' file. |
137 </p> |
134 </p> |
|
135 |
138 <a NAME="BlackConfigurationDialog.__getTargetList" ID="BlackConfigurationDialog.__getTargetList"></a> |
136 <a NAME="BlackConfigurationDialog.__getTargetList" ID="BlackConfigurationDialog.__getTargetList"></a> |
139 <h4>BlackConfigurationDialog.__getTargetList</h4> |
137 <h4>BlackConfigurationDialog.__getTargetList</h4> |
140 <b>__getTargetList</b>(<i></i>) |
138 <b>__getTargetList</b>(<i></i>) |
141 |
|
142 <p> |
139 <p> |
143 Private method to get the list of checked target versions. |
140 Private method to get the list of checked target versions. |
144 </p> |
141 </p> |
|
142 |
145 <dl> |
143 <dl> |
146 <dt>Return:</dt> |
144 <dt>Return:</dt> |
147 <dd> |
145 <dd> |
148 list of target versions |
146 list of target versions |
149 </dd> |
147 </dd> |
155 </dd> |
153 </dd> |
156 </dl> |
154 </dl> |
157 <a NAME="BlackConfigurationDialog.__loadConfiguration" ID="BlackConfigurationDialog.__loadConfiguration"></a> |
155 <a NAME="BlackConfigurationDialog.__loadConfiguration" ID="BlackConfigurationDialog.__loadConfiguration"></a> |
158 <h4>BlackConfigurationDialog.__loadConfiguration</h4> |
156 <h4>BlackConfigurationDialog.__loadConfiguration</h4> |
159 <b>__loadConfiguration</b>(<i>configurationDict</i>) |
157 <b>__loadConfiguration</b>(<i>configurationDict</i>) |
160 |
|
161 <p> |
158 <p> |
162 Private method to load the configuration section with data of the given |
159 Private method to load the configuration section with data of the given |
163 dictionary. |
160 dictionary. |
164 </p> |
161 </p> |
|
162 |
165 <dl> |
163 <dl> |
166 |
164 |
167 <dt><i>configurationDict</i> (dict)</dt> |
165 <dt><i>configurationDict</i> (dict)</dt> |
168 <dd> |
166 <dd> |
169 reference to the data to be loaded |
167 reference to the data to be loaded |
170 </dd> |
168 </dd> |
171 </dl> |
169 </dl> |
172 <a NAME="BlackConfigurationDialog.__populateTargetVersionsList" ID="BlackConfigurationDialog.__populateTargetVersionsList"></a> |
170 <a NAME="BlackConfigurationDialog.__populateTargetVersionsList" ID="BlackConfigurationDialog.__populateTargetVersionsList"></a> |
173 <h4>BlackConfigurationDialog.__populateTargetVersionsList</h4> |
171 <h4>BlackConfigurationDialog.__populateTargetVersionsList</h4> |
174 <b>__populateTargetVersionsList</b>(<i></i>) |
172 <b>__populateTargetVersionsList</b>(<i></i>) |
175 |
|
176 <p> |
173 <p> |
177 Private method to populate the target versions list widget with checkable |
174 Private method to populate the target versions list widget with checkable |
178 Python version entries. |
175 Python version entries. |
179 </p> |
176 </p> |
|
177 |
180 <a NAME="BlackConfigurationDialog.getConfiguration" ID="BlackConfigurationDialog.getConfiguration"></a> |
178 <a NAME="BlackConfigurationDialog.getConfiguration" ID="BlackConfigurationDialog.getConfiguration"></a> |
181 <h4>BlackConfigurationDialog.getConfiguration</h4> |
179 <h4>BlackConfigurationDialog.getConfiguration</h4> |
182 <b>getConfiguration</b>(<i>saveToProject=False</i>) |
180 <b>getConfiguration</b>(<i>saveToProject=False</i>) |
183 |
|
184 <p> |
181 <p> |
185 Public method to get the current configuration parameters. |
182 Public method to get the current configuration parameters. |
186 </p> |
183 </p> |
|
184 |
187 <dl> |
185 <dl> |
188 |
186 |
189 <dt><i>saveToProject</i> (bool (optional))</dt> |
187 <dt><i>saveToProject</i> (bool (optional))</dt> |
190 <dd> |
188 <dd> |
191 flag indicating to save the configuration data in the |
189 flag indicating to save the configuration data in the |
205 </dd> |
203 </dd> |
206 </dl> |
204 </dl> |
207 <a NAME="BlackConfigurationDialog.on_excludeEdit_textChanged" ID="BlackConfigurationDialog.on_excludeEdit_textChanged"></a> |
205 <a NAME="BlackConfigurationDialog.on_excludeEdit_textChanged" ID="BlackConfigurationDialog.on_excludeEdit_textChanged"></a> |
208 <h4>BlackConfigurationDialog.on_excludeEdit_textChanged</h4> |
206 <h4>BlackConfigurationDialog.on_excludeEdit_textChanged</h4> |
209 <b>on_excludeEdit_textChanged</b>(<i></i>) |
207 <b>on_excludeEdit_textChanged</b>(<i></i>) |
210 |
|
211 <p> |
208 <p> |
212 Private slot to enable the validate button depending on the exclude text. |
209 Private slot to enable the validate button depending on the exclude text. |
213 </p> |
210 </p> |
|
211 |
214 <a NAME="BlackConfigurationDialog.on_sourceComboBox_currentTextChanged" ID="BlackConfigurationDialog.on_sourceComboBox_currentTextChanged"></a> |
212 <a NAME="BlackConfigurationDialog.on_sourceComboBox_currentTextChanged" ID="BlackConfigurationDialog.on_sourceComboBox_currentTextChanged"></a> |
215 <h4>BlackConfigurationDialog.on_sourceComboBox_currentTextChanged</h4> |
213 <h4>BlackConfigurationDialog.on_sourceComboBox_currentTextChanged</h4> |
216 <b>on_sourceComboBox_currentTextChanged</b>(<i>selection</i>) |
214 <b>on_sourceComboBox_currentTextChanged</b>(<i>selection</i>) |
217 |
|
218 <p> |
215 <p> |
219 Private slot to handle the selection of a configuration source. |
216 Private slot to handle the selection of a configuration source. |
220 </p> |
217 </p> |
|
218 |
221 <dl> |
219 <dl> |
222 |
220 |
223 <dt><i>selection</i> (str)</dt> |
221 <dt><i>selection</i> (str)</dt> |
224 <dd> |
222 <dd> |
225 text of the currently selected item |
223 text of the currently selected item |
226 </dd> |
224 </dd> |
227 </dl> |
225 </dl> |
228 <a NAME="BlackConfigurationDialog.on_validateButton_clicked" ID="BlackConfigurationDialog.on_validateButton_clicked"></a> |
226 <a NAME="BlackConfigurationDialog.on_validateButton_clicked" ID="BlackConfigurationDialog.on_validateButton_clicked"></a> |
229 <h4>BlackConfigurationDialog.on_validateButton_clicked</h4> |
227 <h4>BlackConfigurationDialog.on_validateButton_clicked</h4> |
230 <b>on_validateButton_clicked</b>(<i></i>) |
228 <b>on_validateButton_clicked</b>(<i></i>) |
231 |
|
232 <p> |
229 <p> |
233 Private slot to validate the entered exclusion regular expression. |
230 Private slot to validate the entered exclusion regular expression. |
234 </p> |
231 </p> |
|
232 |
235 <div align="right"><a href="#top">Up</a></div> |
233 <div align="right"><a href="#top">Up</a></div> |
236 <hr /> |
234 <hr /> |
237 </body></html> |
235 </body></html> |