Documentation/Source/eric5.Utilities.InternalServices.html

branch
BgService
changeset 3209
c5432abceb25
equal deleted inserted replaced
3177:5af61402d74d 3209:c5432abceb25
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric5.Utilities.InternalServices</title>
4 <meta charset="UTF-8">
5 <style>
6 body {
7 background: #EDECE6;
8 margin: 0em 1em 10em 1em;
9 color: black;
10 }
11
12 h1 { color: white; background: #85774A; }
13 h2 { color: white; background: #85774A; }
14 h3 { color: white; background: #9D936E; }
15 h4 { color: white; background: #9D936E; }
16
17 a { color: #BA6D36; }
18
19 </style>
20 </head>
21 <body><a NAME="top" ID="top"></a>
22 <h1>eric5.Utilities.InternalServices</h1>
23 <p>
24 Module implementing a Qt free version of a background client for the various
25 checkers and other python interpreter dependent functions.
26 </p>
27 <h3>Global Attributes</h3>
28 <table>
29 <tr><td>None</td></tr>
30 </table>
31 <h3>Classes</h3>
32 <table>
33 <tr>
34 <td><a href="#InternalServices">InternalServices</a></td>
35 <td>Implement the standard services (syntax with flakes and the style check).</td>
36 </tr>
37 </table>
38 <h3>Functions</h3>
39 <table>
40 <tr><td>None</td></tr>
41 </table>
42 <hr /><hr />
43 <a NAME="InternalServices" ID="InternalServices"></a>
44 <h2>InternalServices</h2>
45 <p>
46 Implement the standard services (syntax with flakes and the style check).
47 </p>
48 <h3>Derived from</h3>
49 QObject
50 <h3>Class Attributes</h3>
51 <table>
52 <tr><td>None</td></tr>
53 </table>
54 <h3>Class Methods</h3>
55 <table>
56 <tr><td>None</td></tr>
57 </table>
58 <h3>Methods</h3>
59 <table>
60 <tr>
61 <td><a href="#InternalServices.__init__">InternalServices</a></td>
62 <td>Contructor of InternalServices.</td>
63 </tr><tr>
64 <td><a href="#InternalServices.__translateStyleCheck">__translateStyleCheck</a></td>
65 <td>Privat slot called after perfoming a style check on one file.</td>
66 </tr><tr>
67 <td><a href="#InternalServices.__translateSyntaxCheck">__translateSyntaxCheck</a></td>
68 <td>Slot to translate the resulting messages.</td>
69 </tr><tr>
70 <td><a href="#InternalServices.styleCheck">styleCheck</a></td>
71 <td>Method to prepare a style check on one Python source file in another task.</td>
72 </tr><tr>
73 <td><a href="#InternalServices.syntaxCheck">syntaxCheck</a></td>
74 <td>Method to prepare to compile one Python source file to Python bytecode and to perform a pyflakes check in another task.</td>
75 </tr>
76 </table>
77 <h3>Static Methods</h3>
78 <table>
79 <tr><td>None</td></tr>
80 </table>
81 <a NAME="InternalServices.__init__" ID="InternalServices.__init__"></a>
82 <h4>InternalServices (Constructor)</h4>
83 <b>InternalServices</b>(<i>backgroundService</i>)
84 <p>
85 Contructor of InternalServices.
86 </p><dl>
87 <dt><i>backgroundService</i></dt>
88 <dd>
89 to connect to
90 </dd>
91 </dl><a NAME="InternalServices.__translateStyleCheck" ID="InternalServices.__translateStyleCheck"></a>
92 <h4>InternalServices.__translateStyleCheck</h4>
93 <b>__translateStyleCheck</b>(<i>fn, codeStyleCheckerStats, results</i>)
94 <p>
95 Privat slot called after perfoming a style check on one file.
96 </p><dl>
97 <dt><i>fn</i></dt>
98 <dd>
99 filename of the just checked file (str)
100 </dd><dt><i>codeStyleCheckerStats</i></dt>
101 <dd>
102 stats of style and name check (dict)
103 </dd><dt><i>results</i></dt>
104 <dd>
105 tuple for each found violation of style (tuple of
106 lineno (int), position (int), text (str), fixed (bool),
107 autofixing (bool), fixedMsg (str))
108 </dd>
109 </dl><a NAME="InternalServices.__translateSyntaxCheck" ID="InternalServices.__translateSyntaxCheck"></a>
110 <h4>InternalServices.__translateSyntaxCheck</h4>
111 <b>__translateSyntaxCheck</b>(<i>fn, nok, fname, line, index, code, error, warnings</i>)
112 <p>
113 Slot to translate the resulting messages.
114 </p><p>
115 If checkFlakes is True, warnings contains a list of strings containing
116 the warnings (marker, file name, line number, message)
117 The values are only valid, if nok is False.
118 </p><dl>
119 <dt><i>fn</i></dt>
120 <dd>
121 filename of the checked file (str)
122 </dd><dt><i>nok</i></dt>
123 <dd>
124 flag if an error in the source was found (boolean)
125 </dd><dt><i>fname</i></dt>
126 <dd>
127 filename of the checked file (str) # TODO: remove dubl.
128 </dd><dt><i>line</i></dt>
129 <dd>
130 number where the error occured (int)
131 </dd><dt><i>index</i></dt>
132 <dd>
133 the column where the error occured (int)
134 </dd><dt><i>code</i></dt>
135 <dd>
136 the part of the code where the error occured (str)
137 </dd><dt><i>error</i></dt>
138 <dd>
139 the name of the error (str)
140 </dd><dt><i>warnings</i></dt>
141 <dd>
142 a list of strings containing the warnings
143 (marker, file name, line number, col, message, list(msg_args))
144 </dd>
145 </dl><a NAME="InternalServices.styleCheck" ID="InternalServices.styleCheck"></a>
146 <h4>InternalServices.styleCheck</h4>
147 <b>styleCheck</b>(<i>filename, source, args, pyVer=None, editor=None</i>)
148 <p>
149 Method to prepare a style check on one Python source file in another
150 task.
151 </p><dl>
152 <dt><i>filename</i></dt>
153 <dd>
154 source filename (string)
155 </dd><dt><i>source</i></dt>
156 <dd>
157 string containing the code to check (string)
158 </dd><dt><i>args</i></dt>
159 <dd>
160 arguments used by the codeStyleCheck function (list of
161 excludeMessages (str), includeMessages (str), repeatMessages
162 (bool), fixCodes (str), noFixCodes (str), fixIssues (bool),
163 maxLineLength (int), hangClosing (bool), docType (str), errors
164 (list of str), eol (str), encoding (str))
165 </dd><dt><i>pyVer=</i></dt>
166 <dd>
167 version of the interpreter to use or None for
168 autodetect corresponding interpreter (int or None)
169 </dd><dt><i>editor=</i></dt>
170 <dd>
171 if the file is opened already (Editor object)
172 </dd>
173 </dl><a NAME="InternalServices.syntaxCheck" ID="InternalServices.syntaxCheck"></a>
174 <h4>InternalServices.syntaxCheck</h4>
175 <b>syntaxCheck</b>(<i>filename, source="", checkFlakes=True, ignoreStarImportWarnings=False, pyVer=None, editor=None</i>)
176 <p>
177 Method to prepare to compile one Python source file to Python bytecode
178 and to perform a pyflakes check in another task.
179 </p><dl>
180 <dt><i>filename</i></dt>
181 <dd>
182 source filename (string)
183 </dd><dt><i>source=</i></dt>
184 <dd>
185 string containing the code to check (string)
186 </dd><dt><i>checkFlakes=</i></dt>
187 <dd>
188 flag indicating to do a pyflakes check (boolean)
189 </dd><dt><i>ignoreStarImportWarnings=</i></dt>
190 <dd>
191 flag indicating to
192 ignore 'star import' warnings (boolean)
193 </dd><dt><i>pyVer=</i></dt>
194 <dd>
195 version of the interpreter to use or None for
196 autodetect corresponding interpreter (int or None)
197 </dd><dt><i>editor=</i></dt>
198 <dd>
199 if the file is opened already (Editor object)
200 </dd>
201 </dl>
202 <div align="right"><a href="#top">Up</a></div>
203 <hr />
204 </body></html>

eric ide

mercurial