1 # -*- coding: utf-8 -*- |
1 # -*- coding: utf-8 -*- |
2 |
2 |
3 # Copyright (c) 2014 - 2019 Detlev Offenbach <detlev@die-offenbachs.de> |
3 # Copyright (c) 2014 - 2019 Detlev Offenbach <detlev@die-offenbachs.de> |
4 # |
4 # |
5 # pylint: disable=C0103 |
|
6 |
5 |
7 """ |
6 """ |
8 Module implementing the syntax check for Python 2/3. |
7 Module implementing the syntax check for JavaScript. |
9 """ |
8 """ |
10 |
9 |
11 from __future__ import unicode_literals |
10 import queue |
12 |
|
13 try: # Only for Py2 |
|
14 import Queue as queue |
|
15 except ImportError: |
|
16 import queue |
|
17 |
|
18 import os |
11 import os |
19 import sys |
12 import sys |
20 import multiprocessing |
13 import multiprocessing |
21 |
14 |
22 |
15 |
142 taskQueue.put('STOP') |
135 taskQueue.put('STOP') |
143 |
136 |
144 |
137 |
145 def worker(inputQueue, outputQueue): |
138 def worker(inputQueue, outputQueue): |
146 """ |
139 """ |
147 Module function acting as the parallel worker for the style check. |
140 Module function acting as the parallel worker for the syntax check. |
148 |
141 |
149 @param inputQueue input queue (multiprocessing.Queue) |
142 @param inputQueue input queue (multiprocessing.Queue) |
150 @param outputQueue output queue (multiprocessing.Queue) |
143 @param outputQueue output queue (multiprocessing.Queue) |
151 """ |
144 """ |
152 for filename, args in iter(inputQueue.get, 'STOP'): |
145 for filename, args in iter(inputQueue.get, 'STOP'): |