Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix alerts founded the LGTM system and add LGTM configuration file #13156

Merged
merged 1 commit into from
Jan 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix alerts founded the LGTM system and add LGTM configuration file
Signed-off-by: Taras Drozdovskyi <t.drozdovsky@samsung.com>
  • Loading branch information
tdrozdovsky committed Dec 23, 2021
commit 12e88f8c965ac1837f4aab434820439403029e8c
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"]
tdrozdovsky marked this conversation as resolved.
Show resolved Hide resolved
__all__ = ["Status", "InteractionModelError"]


class Status(enum.IntEnum):
Expand Down