Fri, 24 Apr 2015 18:41:06 +0200
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
3673
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
1 | <!DOCTYPE html> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
2 | <html><head> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
3 | <title>eric6.Plugins.CheckerPlugins.Tabnanny.Tabnanny</title> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
4 | <meta charset="UTF-8"> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
5 | <style> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
6 | body { |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
7 | background: #EDECE6; |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
8 | margin: 0em 1em 10em 1em; |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
9 | color: black; |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
10 | } |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
11 | |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
12 | h1 { color: white; background: #85774A; } |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
13 | h2 { color: white; background: #85774A; } |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
14 | h3 { color: white; background: #9D936E; } |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
15 | h4 { color: white; background: #9D936E; } |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
16 | |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
17 | a { color: #BA6D36; } |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
18 | |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
19 | </style> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
20 | </head> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
21 | <body><a NAME="top" ID="top"></a> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
22 | <h1>eric6.Plugins.CheckerPlugins.Tabnanny.Tabnanny</h1> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
23 | <p> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
24 | The Tab Nanny despises ambiguous indentation. She knows no mercy. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
25 | </p><p> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
26 | tabnanny -- Detection of ambiguous indentation |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
27 | </p><p> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
28 | For the time being this module is intended to be called as a script. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
29 | However it is possible to import it into an IDE and use the function |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
30 | check() described below. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
31 | </p><p> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
32 | Warning: The API provided by this module is likely to change in future |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
33 | releases; such changes may not be backward compatible. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
34 | </p><p> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
35 | This is a modified version to make the original tabnanny better suitable |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
36 | for being called from within the eric6 IDE. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
37 | </p><dl> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
38 | <dt>Raises <b>ValueError</b>:</dt> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
39 | <dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
40 | The tokenize module is too old. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
41 | </dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
42 | </dl> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
43 | <h3>Global Attributes</h3> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
44 | <table> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
45 | <tr><td>__all__</td></tr><tr><td>__version__</td></tr> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
46 | </table> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
47 | <h3>Classes</h3> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
48 | <table> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
49 | <tr> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
50 | <td><a href="#NannyNag">NannyNag</a></td> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
51 | <td>Class implementing an exception for indentation issues.</td> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
52 | </tr><tr> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
53 | <td><a href="#Whitespace">Whitespace</a></td> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
54 | <td>Class implementing the whitespace checker.</td> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
55 | </tr> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
56 | </table> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
57 | <h3>Functions</h3> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
58 | <table> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
59 | <tr> |
4237
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
60 | <td><a href="#__check">__check</a></td> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
61 | <td>Private function to check one Python source file for whitespace related problems.</td> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
62 | </tr><tr> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
63 | <td><a href="#batchCheck">batchCheck</a></td> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
64 | <td>Module function to check a batch of files for whitespace related problems.</td> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
65 | </tr><tr> |
3673
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
66 | <td><a href="#check">check</a></td> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
67 | <td>Private function to check one Python source file for whitespace related problems.</td> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
68 | </tr><tr> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
69 | <td><a href="#format_witnesses">format_witnesses</a></td> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
70 | <td>Function to format the witnesses as a readable string.</td> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
71 | </tr><tr> |
4237
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
72 | <td><a href="#initBatchService">initBatchService</a></td> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
73 | <td>Initialize the batch service and return the entry point.</td> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
74 | </tr><tr> |
3673
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
75 | <td><a href="#initService">initService</a></td> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
76 | <td>Initialize the service and return the entry point.</td> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
77 | </tr><tr> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
78 | <td><a href="#process_tokens">process_tokens</a></td> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
79 | <td>Function processing all tokens generated by a tokenizer run.</td> |
4237
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
80 | </tr><tr> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
81 | <td><a href="#worker">worker</a></td> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
82 | <td>Module function acting as the parallel worker for the style check.</td> |
3673
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
83 | </tr> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
84 | </table> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
85 | <hr /><hr /> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
86 | <a NAME="NannyNag" ID="NannyNag"></a> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
87 | <h2>NannyNag</h2> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
88 | <p> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
89 | Class implementing an exception for indentation issues. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
90 | </p><p> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
91 | Raised by tokeneater() if detecting an ambiguous indent. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
92 | Captured and handled in check(). |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
93 | </p> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
94 | <h3>Derived from</h3> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
95 | Exception |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
96 | <h3>Class Attributes</h3> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
97 | <table> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
98 | <tr><td>None</td></tr> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
99 | </table> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
100 | <h3>Class Methods</h3> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
101 | <table> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
102 | <tr><td>None</td></tr> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
103 | </table> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
104 | <h3>Methods</h3> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
105 | <table> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
106 | <tr> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
107 | <td><a href="#NannyNag.__init__">NannyNag</a></td> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
108 | <td>Constructor</td> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
109 | </tr><tr> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
110 | <td><a href="#NannyNag.get_line">get_line</a></td> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
111 | <td>Public method to retrieve the offending line.</td> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
112 | </tr><tr> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
113 | <td><a href="#NannyNag.get_lineno">get_lineno</a></td> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
114 | <td>Public method to retrieve the line number.</td> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
115 | </tr><tr> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
116 | <td><a href="#NannyNag.get_msg">get_msg</a></td> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
117 | <td>Public method to retrieve the message.</td> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
118 | </tr> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
119 | </table> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
120 | <h3>Static Methods</h3> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
121 | <table> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
122 | <tr><td>None</td></tr> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
123 | </table> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
124 | <a NAME="NannyNag.__init__" ID="NannyNag.__init__"></a> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
125 | <h4>NannyNag (Constructor)</h4> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
126 | <b>NannyNag</b>(<i>lineno, msg, line</i>) |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
127 | <p> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
128 | Constructor |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
129 | </p><dl> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
130 | <dt><i>lineno</i></dt> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
131 | <dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
132 | Line number of the ambiguous indent. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
133 | </dd><dt><i>msg</i></dt> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
134 | <dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
135 | Descriptive message assigned to this problem. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
136 | </dd><dt><i>line</i></dt> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
137 | <dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
138 | The offending source line. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
139 | </dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
140 | </dl><a NAME="NannyNag.get_line" ID="NannyNag.get_line"></a> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
141 | <h4>NannyNag.get_line</h4> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
142 | <b>get_line</b>(<i></i>) |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
143 | <p> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
144 | Public method to retrieve the offending line. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
145 | </p><dl> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
146 | <dt>Returns:</dt> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
147 | <dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
148 | The line of code (string) |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
149 | </dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
150 | </dl><a NAME="NannyNag.get_lineno" ID="NannyNag.get_lineno"></a> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
151 | <h4>NannyNag.get_lineno</h4> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
152 | <b>get_lineno</b>(<i></i>) |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
153 | <p> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
154 | Public method to retrieve the line number. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
155 | </p><dl> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
156 | <dt>Returns:</dt> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
157 | <dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
158 | The line number (integer) |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
159 | </dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
160 | </dl><a NAME="NannyNag.get_msg" ID="NannyNag.get_msg"></a> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
161 | <h4>NannyNag.get_msg</h4> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
162 | <b>get_msg</b>(<i></i>) |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
163 | <p> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
164 | Public method to retrieve the message. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
165 | </p><dl> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
166 | <dt>Returns:</dt> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
167 | <dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
168 | The error message (string) |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
169 | </dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
170 | </dl> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
171 | <div align="right"><a href="#top">Up</a></div> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
172 | <hr /><hr /> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
173 | <a NAME="Whitespace" ID="Whitespace"></a> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
174 | <h2>Whitespace</h2> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
175 | <p> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
176 | Class implementing the whitespace checker. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
177 | </p> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
178 | <h3>Derived from</h3> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
179 | object |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
180 | <h3>Class Attributes</h3> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
181 | <table> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
182 | <tr><td>None</td></tr> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
183 | </table> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
184 | <h3>Class Methods</h3> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
185 | <table> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
186 | <tr><td>None</td></tr> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
187 | </table> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
188 | <h3>Methods</h3> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
189 | <table> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
190 | <tr> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
191 | <td><a href="#Whitespace.__init__">Whitespace</a></td> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
192 | <td>Constructor</td> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
193 | </tr><tr> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
194 | <td><a href="#Whitespace.equal">equal</a></td> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
195 | <td>Public method to compare the indentation levels of two Whitespace objects for equality.</td> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
196 | </tr><tr> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
197 | <td><a href="#Whitespace.indent_level">indent_level</a></td> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
198 | <td>Public method to determine the indentation level.</td> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
199 | </tr><tr> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
200 | <td><a href="#Whitespace.less">less</a></td> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
201 | <td>Public method to compare the indentation level against another Whitespace objects to be smaller.</td> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
202 | </tr><tr> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
203 | <td><a href="#Whitespace.longest_run_of_spaces">longest_run_of_spaces</a></td> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
204 | <td>Public method to calculate the length of longest contiguous run of spaces.</td> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
205 | </tr><tr> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
206 | <td><a href="#Whitespace.not_equal_witness">not_equal_witness</a></td> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
207 | <td>Public method to calculate a tuple of witnessing tab size.</td> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
208 | </tr><tr> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
209 | <td><a href="#Whitespace.not_less_witness">not_less_witness</a></td> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
210 | <td>Public method to calculate a tuple of witnessing tab size.</td> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
211 | </tr> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
212 | </table> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
213 | <h3>Static Methods</h3> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
214 | <table> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
215 | <tr><td>None</td></tr> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
216 | </table> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
217 | <a NAME="Whitespace.__init__" ID="Whitespace.__init__"></a> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
218 | <h4>Whitespace (Constructor)</h4> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
219 | <b>Whitespace</b>(<i>ws</i>) |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
220 | <p> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
221 | Constructor |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
222 | </p><dl> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
223 | <dt><i>ws</i></dt> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
224 | <dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
225 | The string to be checked. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
226 | </dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
227 | </dl><a NAME="Whitespace.equal" ID="Whitespace.equal"></a> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
228 | <h4>Whitespace.equal</h4> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
229 | <b>equal</b>(<i>other</i>) |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
230 | <p> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
231 | Public method to compare the indentation levels of two Whitespace |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
232 | objects for equality. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
233 | </p><dl> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
234 | <dt><i>other</i></dt> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
235 | <dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
236 | Whitespace object to compare against. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
237 | </dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
238 | </dl><dl> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
239 | <dt>Returns:</dt> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
240 | <dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
241 | True, if we compare equal against the other Whitespace object. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
242 | </dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
243 | </dl><a NAME="Whitespace.indent_level" ID="Whitespace.indent_level"></a> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
244 | <h4>Whitespace.indent_level</h4> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
245 | <b>indent_level</b>(<i>tabsize</i>) |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
246 | <p> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
247 | Public method to determine the indentation level. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
248 | </p><dl> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
249 | <dt><i>tabsize</i></dt> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
250 | <dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
251 | The length of a tab stop. (integer) |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
252 | </dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
253 | </dl><dl> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
254 | <dt>Returns:</dt> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
255 | <dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
256 | indentation level (integer) |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
257 | </dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
258 | </dl><a NAME="Whitespace.less" ID="Whitespace.less"></a> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
259 | <h4>Whitespace.less</h4> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
260 | <b>less</b>(<i>other</i>) |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
261 | <p> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
262 | Public method to compare the indentation level against another |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
263 | Whitespace objects to be smaller. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
264 | </p><dl> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
265 | <dt><i>other</i></dt> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
266 | <dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
267 | Whitespace object to compare against. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
268 | </dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
269 | </dl><dl> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
270 | <dt>Returns:</dt> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
271 | <dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
272 | True, if we compare less against the other Whitespace object. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
273 | </dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
274 | </dl><a NAME="Whitespace.longest_run_of_spaces" ID="Whitespace.longest_run_of_spaces"></a> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
275 | <h4>Whitespace.longest_run_of_spaces</h4> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
276 | <b>longest_run_of_spaces</b>(<i></i>) |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
277 | <p> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
278 | Public method to calculate the length of longest contiguous run of |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
279 | spaces. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
280 | </p><dl> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
281 | <dt>Returns:</dt> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
282 | <dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
283 | The length of longest contiguous run of spaces (whether or not |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
284 | preceding a tab) |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
285 | </dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
286 | </dl><a NAME="Whitespace.not_equal_witness" ID="Whitespace.not_equal_witness"></a> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
287 | <h4>Whitespace.not_equal_witness</h4> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
288 | <b>not_equal_witness</b>(<i>other</i>) |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
289 | <p> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
290 | Public method to calculate a tuple of witnessing tab size. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
291 | </p><p> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
292 | Intended to be used after not self.equal(other) is known, in which |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
293 | case it will return at least one witnessing tab size. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
294 | </p><dl> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
295 | <dt><i>other</i></dt> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
296 | <dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
297 | Whitespace object to calculate against. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
298 | </dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
299 | </dl><dl> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
300 | <dt>Returns:</dt> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
301 | <dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
302 | A list of tuples (ts, i1, i2) such that |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
303 | i1 == self.indent_level(ts) != other.indent_level(ts) == i2. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
304 | </dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
305 | </dl><a NAME="Whitespace.not_less_witness" ID="Whitespace.not_less_witness"></a> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
306 | <h4>Whitespace.not_less_witness</h4> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
307 | <b>not_less_witness</b>(<i>other</i>) |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
308 | <p> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
309 | Public method to calculate a tuple of witnessing tab size. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
310 | </p><p> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
311 | Intended to be used after not self.less(other is known, in which |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
312 | case it will return at least one witnessing tab size. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
313 | </p><dl> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
314 | <dt><i>other</i></dt> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
315 | <dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
316 | Whitespace object to calculate against. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
317 | </dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
318 | </dl><dl> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
319 | <dt>Returns:</dt> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
320 | <dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
321 | A list of tuples (ts, i1, i2) such that |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
322 | i1 == self.indent_level(ts) >= other.indent_level(ts) == i2. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
323 | </dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
324 | </dl> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
325 | <div align="right"><a href="#top">Up</a></div> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
326 | <hr /><hr /> |
4237
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
327 | <a NAME="__check" ID="__check"></a> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
328 | <h2>__check</h2> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
329 | <b>__check</b>(<i>file, text=""</i>) |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
330 | <p> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
331 | Private function to check one Python source file for whitespace related |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
332 | problems. |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
333 | </p><dl> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
334 | <dt><i>file</i></dt> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
335 | <dd> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
336 | source filename (string) |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
337 | </dd><dt><i>text</i></dt> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
338 | <dd> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
339 | source text (string) |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
340 | </dd> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
341 | </dl><dl> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
342 | <dt>Returns:</dt> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
343 | <dd> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
344 | A tuple indicating status (True = an error was found), the |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
345 | filename, the linenumber and the error message |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
346 | (boolean, string, string). The values are only |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
347 | valid, if the status is True. |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
348 | </dd> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
349 | </dl> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
350 | <div align="right"><a href="#top">Up</a></div> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
351 | <hr /><hr /> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
352 | <a NAME="batchCheck" ID="batchCheck"></a> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
353 | <h2>batchCheck</h2> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
354 | <b>batchCheck</b>(<i>argumentsList, send, fx, cancelled</i>) |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
355 | <p> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
356 | Module function to check a batch of files for whitespace related problems. |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
357 | </p><dl> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
358 | <dt><i>argumentsList</i></dt> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
359 | <dd> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
360 | list of arguments tuples as given for check |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
361 | </dd><dt><i>send</i></dt> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
362 | <dd> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
363 | reference to send function (function) |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
364 | </dd><dt><i>fx</i></dt> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
365 | <dd> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
366 | registered service name (string) |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
367 | </dd><dt><i>cancelled</i></dt> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
368 | <dd> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
369 | reference to function checking for a cancellation |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
370 | (function) |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
371 | </dd> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
372 | </dl> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
373 | <div align="right"><a href="#top">Up</a></div> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
374 | <hr /><hr /> |
3673
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
375 | <a NAME="check" ID="check"></a> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
376 | <h2>check</h2> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
377 | <b>check</b>(<i>file, text=""</i>) |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
378 | <p> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
379 | Private function to check one Python source file for whitespace related |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
380 | problems. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
381 | </p><dl> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
382 | <dt><i>file</i></dt> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
383 | <dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
384 | source filename (string) |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
385 | </dd><dt><i>text</i></dt> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
386 | <dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
387 | source text (string) |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
388 | </dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
389 | </dl><dl> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
390 | <dt>Returns:</dt> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
391 | <dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
392 | A tuple indicating status (True = an error was found), the |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
393 | filename, the linenumber and the error message |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
394 | (boolean, string, string, string). The values are only |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
395 | valid, if the status is True. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
396 | </dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
397 | </dl> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
398 | <div align="right"><a href="#top">Up</a></div> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
399 | <hr /><hr /> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
400 | <a NAME="format_witnesses" ID="format_witnesses"></a> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
401 | <h2>format_witnesses</h2> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
402 | <b>format_witnesses</b>(<i>w</i>) |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
403 | <p> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
404 | Function to format the witnesses as a readable string. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
405 | </p><dl> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
406 | <dt><i>w</i></dt> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
407 | <dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
408 | A list of witnesses |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
409 | </dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
410 | </dl><dl> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
411 | <dt>Returns:</dt> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
412 | <dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
413 | A formated string of the witnesses. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
414 | </dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
415 | </dl> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
416 | <div align="right"><a href="#top">Up</a></div> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
417 | <hr /><hr /> |
4237
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
418 | <a NAME="initBatchService" ID="initBatchService"></a> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
419 | <h2>initBatchService</h2> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
420 | <b>initBatchService</b>(<i></i>) |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
421 | <p> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
422 | Initialize the batch service and return the entry point. |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
423 | </p><dl> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
424 | <dt>Returns:</dt> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
425 | <dd> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
426 | the entry point for the background client (function) |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
427 | </dd> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
428 | </dl> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
429 | <div align="right"><a href="#top">Up</a></div> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
430 | <hr /><hr /> |
3673
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
431 | <a NAME="initService" ID="initService"></a> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
432 | <h2>initService</h2> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
433 | <b>initService</b>(<i></i>) |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
434 | <p> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
435 | Initialize the service and return the entry point. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
436 | </p><dl> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
437 | <dt>Returns:</dt> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
438 | <dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
439 | the entry point for the background client (function) |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
440 | </dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
441 | </dl> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
442 | <div align="right"><a href="#top">Up</a></div> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
443 | <hr /><hr /> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
444 | <a NAME="process_tokens" ID="process_tokens"></a> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
445 | <h2>process_tokens</h2> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
446 | <b>process_tokens</b>(<i>tokens</i>) |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
447 | <p> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
448 | Function processing all tokens generated by a tokenizer run. |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
449 | </p><dl> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
450 | <dt><i>tokens</i></dt> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
451 | <dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
452 | list of tokens |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
453 | </dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
454 | </dl><dl> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
455 | <dt>Raises <b>NannyNag</b>:</dt> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
456 | <dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
457 | raised to indicate an indentation error |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
458 | </dd> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
459 | </dl> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
460 | <div align="right"><a href="#top">Up</a></div> |
4237
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
461 | <hr /><hr /> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
462 | <a NAME="worker" ID="worker"></a> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
463 | <h2>worker</h2> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
464 | <b>worker</b>(<i>input, output</i>) |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
465 | <p> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
466 | Module function acting as the parallel worker for the style check. |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
467 | </p><dl> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
468 | <dt><i>input</i></dt> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
469 | <dd> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
470 | input queue (multiprocessing.Queue) |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
471 | </dd><dt><i>output</i></dt> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
472 | <dd> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
473 | output queue (multiprocessing.Queue) |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
474 | </dd> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
475 | </dl> |
ff8a3e769fca
Added a batch mode to the indentation checker to make use of multiple CPUs/CPU-Cores.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3673
diff
changeset
|
476 | <div align="right"><a href="#top">Up</a></div> |
3673
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
477 | <hr /> |
e26d7d0c1088
Generated source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
478 | </body></html> |