Skip to content

Commit

Permalink
Static analysis fixes (#1154)
Browse files Browse the repository at this point in the history
Fixed incorrect type checking logic flagged by flake8
  • Loading branch information
cartertinney authored Aug 28, 2023
1 parent 0144401 commit 5d343d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dev_utils/dev_utils/service_helper_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def on_event_batch(partition_context, events):
if device_id == self.device_id and module_id == self.module_id:

converted_event = self._convert_incoming_event(event)
if type(converted_event) == EventhubEvent:
if isinstance(converted_event, EventhubEvent):
if "message-id" in converted_event.system_properties:
logger.info(
"Received event with msgid={}".format(
Expand Down
2 changes: 1 addition & 1 deletion samples/pnp/simple_thermostat.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async def reboot_handler(values):
global min_temp
global avg_temp_list
global target_temperature
if values and type(values) == int:
if isinstance(values, int):
print("Rebooting after delay of {delay} secs".format(delay=values))
asyncio.sleep(values)
max_temp = None
Expand Down

0 comments on commit 5d343d5

Please sign in to comment.