Skip to content

Commit

Permalink
refactor: use is to compare type of objects (#36)
Browse files Browse the repository at this point in the history
It is recommended to use `identity test` ( `is` ) instead of equality test ( `==` ) when you need to compare types of two objects.

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
  • Loading branch information
deepsource-autofix[bot] authored Jan 9, 2024
1 parent 964798e commit eecbb5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/nonebot_plugin_addFriend/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def filterFriend(comment, type, allowTextList):


async def parseMsg(commandText, resMsg, font_size=32, isText=1):
if type(resMsg) == list:
if type(resMsg) is list:
temp = ''.join(str(item)+'\n' for item in resMsg)
temp = temp.replace("'", "").replace('"', '')
resMsg = temp
Expand Down

0 comments on commit eecbb5e

Please sign in to comment.