|
14 | 14 | See the License for the specific language governing permissions and
|
15 | 15 | limitations under the License.
|
16 | 16 | """
|
17 |
| -from os import stat, walk, remove |
| 17 | +from os import stat, walk |
18 | 18 | from os.path import join, splitext, exists, relpath, dirname, basename, split
|
19 | 19 | from shutil import copyfile
|
20 | 20 | from copy import copy
|
|
23 | 23 | from time import time
|
24 | 24 |
|
25 | 25 | from workspace_tools.utils import run_cmd, mkdir, rel_path, ToolException, split_path
|
26 |
| -from workspace_tools.patch import patch |
27 | 26 | from workspace_tools.settings import BUILD_OPTIONS, MBED_ORG_USER
|
28 | 27 |
|
29 |
| -from multiprocessing import Pool, Manager, cpu_count |
| 28 | +from multiprocessing import Pool, cpu_count |
30 | 29 | from time import sleep
|
31 |
| -from pprint import pprint |
32 | 30 |
|
33 | 31 | import workspace_tools.hooks as hooks
|
34 | 32 | import re
|
@@ -58,7 +56,7 @@ def print_notify_verbose(event):
|
58 | 56 | elif event['type'] == 'cc':
|
59 | 57 | event['severity'] = event['severity'].title()
|
60 | 58 | event['file'] = basename(event['file'])
|
61 |
| - event['mcu_name'] = "None" |
| 59 | + event['mcu_name'] = "None" |
62 | 60 | event['toolchain'] = "None"
|
63 | 61 | event['target_name'] = event['target_name'].upper() if event['target_name'] else "Unknown"
|
64 | 62 | event['toolchain_name'] = event['toolchain_name'].upper() if event['toolchain_name'] else "Unknown"
|
@@ -153,7 +151,7 @@ def win_to_unix(self):
|
153 | 151 | self.linker_script = self.linker_script.replace('\\', '/')
|
154 | 152 |
|
155 | 153 | def __str__(self):
|
156 |
| - s = [] |
| 154 | + s = [] |
157 | 155 |
|
158 | 156 | for (label, resources) in (
|
159 | 157 | ('Include Directories', self.inc_dirs),
|
@@ -242,7 +240,7 @@ def __init__(self, target, options=None, notify=None, macros=None):
|
242 | 240 |
|
243 | 241 | self.mp_pool = None
|
244 | 242 |
|
245 |
| - def __exit__(): |
| 243 | + def __exit__(self): |
246 | 244 | if self.mp_pool is not None:
|
247 | 245 | self.mp_pool.terminate()
|
248 | 246 |
|
@@ -366,7 +364,7 @@ def scan_resources(self, path):
|
366 | 364 | elif ext == '.o':
|
367 | 365 | resources.objects.append(file_path)
|
368 | 366 |
|
369 |
| - elif ext == self.LIBRARY_EXT: |
| 367 | + elif ext == self.LIBRARY_EXT: |
370 | 368 | resources.libraries.append(file_path)
|
371 | 369 | resources.lib_dirs.add(root)
|
372 | 370 |
|
@@ -443,9 +441,9 @@ def compile_sources(self, resources, build_path, inc_dirs=None):
|
443 | 441 | if inc_dirs is not None:
|
444 | 442 | inc_paths.extend(inc_dirs)
|
445 | 443 |
|
446 |
| - objects=[] |
447 |
| - queue=[] |
448 |
| - prev_dir=None |
| 444 | + objects = [] |
| 445 | + queue = [] |
| 446 | + prev_dir = None |
449 | 447 |
|
450 | 448 | # The dependency checking for C/C++ is delegated to the compiler
|
451 | 449 | base_path = resources.base_path
|
@@ -692,7 +690,8 @@ def var(self, key, value):
|
692 | 690 |
|
693 | 691 |
|
694 | 692 | from workspace_tools.toolchains.arm import ARM_STD, ARM_MICRO
|
695 |
| -from workspace_tools.toolchains.gcc import GCC_ARM, GCC_CS, GCC_CR, GCC_CW_EWL, GCC_CW_NEWLIB |
| 693 | +from workspace_tools.toolchains.gcc import GCC_ARM, GCC_CS, GCC_CR |
| 694 | +from workspace_tools.toolchains.gcc import GCC_CW_EWL, GCC_CW_NEWLIB |
696 | 695 | from workspace_tools.toolchains.iar import IAR
|
697 | 696 |
|
698 | 697 | TOOLCHAIN_CLASSES = {
|
|
0 commit comments