Skip to content

Commit

Permalink
Fix alerts founded the LGTM system and add LGTM configuration file (#…
Browse files Browse the repository at this point in the history
…13156)

Signed-off-by: Taras Drozdovskyi <[email protected]>
  • Loading branch information
tdrozdovsky authored and pull[bot] committed May 27, 2022
1 parent 90f2440 commit aee3dd6
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions lgtm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
queries:
- exclude: py/unused-import
- exclude: py/polluting-import
4 changes: 2 additions & 2 deletions src/controller/python/chip/ChipDeviceCtrl.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,11 +392,11 @@ def DeviceAvailableCallback(device, err):

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

if returnDevice.value == None:
if returnDevice.value is None:
raise self._ChipStack.ErrorToException(CHIP_ERROR_INTERNAL)
return returnDevice

Expand Down
2 changes: 1 addition & 1 deletion src/controller/python/chip/ChipReplStartup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def ReplInit():


def matterhelp(classOrObj=None):
if (classOrObj == None):
if (classOrObj is None):
inspect(builtins.devCtrl, methods=True, help=True, private=False)
inspect(mattersetlog)
inspect(mattersetdebug)
Expand Down
2 changes: 1 addition & 1 deletion src/controller/python/chip/clusters/Command.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def _handleResponse(self, path: CommandPath, status: Status, response: bytes):
self._future.set_result(None)
else:
# If a type hasn't been assigned, let's auto-deduce it.
if (self._expect_type == None):
if (self._expect_type is None):
self._expect_type = FindCommandClusterObject(False, path)

if self._expect_type:
Expand Down
2 changes: 1 addition & 1 deletion src/controller/python/chip/interaction_model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

from chip.exceptions import ChipStackException

__all__ = ["IMDelegate", "Status", "InteractionModelError"]
__all__ = ["Status", "InteractionModelError"]


class Status(enum.IntEnum):
Expand Down

0 comments on commit aee3dd6

Please sign in to comment.