Skip to content

Commit 75a61df

Browse files
committed
Fix review requests
- Shorten variable name - Use comprehension to format include paths
1 parent b668185 commit 75a61df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/export/cdt/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ def generate(self):
1414
py_ocd_settings launch file, and software link .p2f file
1515
"""
1616
super(Eclipse, self).generate()
17-
include_paths_replace_re= re.compile(r'(^[.]/|^[.]$)')
17+
starting_dot = re.compile(r'(^[.]/|^[.]$)')
1818
ctx = {
1919
'name': self.project_name,
2020
'elf_location': join('BUILD',self.project_name)+'.elf',
2121
'c_symbols': self.toolchain.get_symbols(),
2222
'asm_symbols': self.toolchain.get_symbols(True),
2323
'target': self.target,
24-
'include_paths': map(lambda s: include_paths_replace_re.sub('%s/' % self.project_name, s), self.resources.inc_dirs),
24+
'include_paths': [starting_dot.sub('%s/' % self.project_name, inc) for inc in self.resources.inc_dirs],
2525
'load_exe': str(self.LOAD_EXE).lower()
2626
}
2727

0 commit comments

Comments
 (0)