Skip to content

Commit d7c6b8b

Browse files
committed
[CI] Fix style consistency report by flake8
W605 invalid escape sequence F841 local variable 'err' is assigned to but never used E501 line too long (95 > 88 characters) Signed-off-by: Frederic.Pillon <[email protected]>
1 parent 4014724 commit d7c6b8b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

CI/build/.flake8

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[flake8]
2-
max-line-length = 88
2+
max-line-length = 95

CI/build/arduino-builder.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -202,15 +202,15 @@ def get_ide_version():
202202
[os.path.join(arduino_path, "arduino"), "--version"],
203203
stderr=subprocess.DEVNULL,
204204
)
205-
res = re.match("\D*(\d)\.(\d+)\.(\d+)", output.decode("utf-8"))
205+
res = re.match("\\D*(\\d)\\.(\\d+)\\.(\\d+)", output.decode("utf-8"))
206206
if res:
207207
core_api_version = (
208208
res.group(1) + res.group(2).zfill(2) + res.group(3).zfill(2)
209209
)
210210
print("Arduino IDE version used: " + core_api_version)
211211
else:
212212
raise subprocess.CalledProcessError(1, "re")
213-
except subprocess.CalledProcessError as err:
213+
except subprocess.CalledProcessError:
214214
print("Unable to define Arduino IDE version, use default: " + core_api_version)
215215

216216

@@ -414,7 +414,7 @@ def find_board():
414414
# genericSTM32F103C.menu.device_variant.STM32F103C8=
415415
# genericSTM32F103R.menu.device_variant.STM32F103R8.build.variant
416416
board_pattern = re.compile(
417-
"([^#\.]+)(?:\.menu\.(?:pnum|device_variant)\.)?([^\.]+)?(?:\.build\.variant)?="
417+
"([^#\\.]+)(?:\\.menu\\.(?:pnum|device_variant)\\.)?([^\\.]+)?(?:\\.build\\.variant)?="
418418
)
419419
core_pattern = re.compile(
420420
"\\"

0 commit comments

Comments
 (0)