Skip to content

Commit 5013641

Browse files
Merge pull request #124 from bridadan/fix_flake8_errors
Fix flake8 errors
2 parents c59fc15 + 9fd3e86 commit 5013641

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
displayName: 'Install mbed-os test dependencies'
6666
-
6767
script: |
68-
pip install --user flake8
68+
pip install --user flake8==3.7.3
6969
python -m flake8
7070
condition: eq(variables['extraActions'], 'true')
7171
displayName: 'Enforce code style'

src/mbed_os_tools/detect/lstools_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,9 +398,9 @@ def mock_manufacture_id(self, mid, platform_name, oper="+"):
398398
'-' remove mid from mocking entry
399399
@return Mocked structure (json format)
400400
"""
401-
if oper is "+":
401+
if oper == "+":
402402
self.plat_db.add(mid, platform_name, permanent=True)
403-
elif oper is "-":
403+
elif oper == "-":
404404
self.plat_db.remove(mid, permanent=True)
405405
else:
406406
raise ValueError("oper can only be [+-]")

src/mbed_os_tools/detect/platform_database.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ def remove(self, id, permanent=False, device_type="daplink", verbose_data=False)
514514
as a dict.
515515
"""
516516
logger.debug("Trying remove of %s", id)
517-
if id is "*" and device_type in self._dbs[self._prim_db]:
517+
if id == "*" and device_type in self._dbs[self._prim_db]:
518518
self._dbs[self._prim_db][device_type] = {}
519519
if permanent:
520520
self._update_db()

0 commit comments

Comments
 (0)