Skip to content

Commit 88572ac

Browse files
authored
Fix alerts founded the LGTM system and add LGTM configuration file (project-chip#13156)
Signed-off-by: Taras Drozdovskyi <t.drozdovsky@samsung.com>
1 parent 175218b commit 88572ac

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

lgtm.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
queries:
2+
- exclude: py/unused-import
3+
- exclude: py/polluting-import

src/controller/python/chip/ChipDeviceCtrl.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -392,11 +392,11 @@ def DeviceAvailableCallback(device, err):
392392

393393
# The callback might have been received synchronously (during self._ChipStack.Call()).
394394
# Check if the device is already set before waiting for the callback.
395-
if returnDevice.value == None:
395+
if returnDevice.value is None:
396396
with deviceAvailableCV:
397397
deviceAvailableCV.wait()
398398

399-
if returnDevice.value == None:
399+
if returnDevice.value is None:
400400
raise self._ChipStack.ErrorToException(CHIP_ERROR_INTERNAL)
401401
return returnDevice
402402

src/controller/python/chip/ChipReplStartup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def ReplInit():
4141

4242

4343
def matterhelp(classOrObj=None):
44-
if (classOrObj == None):
44+
if (classOrObj is None):
4545
inspect(builtins.devCtrl, methods=True, help=True, private=False)
4646
inspect(mattersetlog)
4747
inspect(mattersetdebug)

src/controller/python/chip/clusters/Command.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def _handleResponse(self, path: CommandPath, status: Status, response: bytes):
7474
self._future.set_result(None)
7575
else:
7676
# If a type hasn't been assigned, let's auto-deduce it.
77-
if (self._expect_type == None):
77+
if (self._expect_type is None):
7878
self._expect_type = FindCommandClusterObject(False, path)
7979

8080
if self._expect_type:

src/controller/python/chip/interaction_model/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
from chip.exceptions import ChipStackException
2828

29-
__all__ = ["IMDelegate", "Status", "InteractionModelError"]
29+
__all__ = ["Status", "InteractionModelError"]
3030

3131

3232
class Status(enum.IntEnum):

0 commit comments

Comments
 (0)