Skip to content

Commit

Permalink
Fix Syntax Warnings (AvinashReddy3108#44)
Browse files Browse the repository at this point in the history
* Fix Syntax Warnings
SyntaxWarning: "is" with a literal. Did you mean "=="?
  • Loading branch information
Bilibox authored and Avinash Reddy committed Dec 18, 2019
1 parent d8ab822 commit 88a9d66
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion userbot/modules/evaluators.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ async def terminal_runner(term):
remove("output.txt")
return

if uid is 0:
if uid == 0:
await term.edit("`" f"{curruser}:~# {command}" f"\n{result}" "`")
else:
await term.edit("`" f"{curruser}:~$ {command}" f"\n{result}" "`")
Expand Down
6 changes: 3 additions & 3 deletions userbot/modules/memes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1054,17 +1054,17 @@ async def scam(event):
]
input_str = event.pattern_match.group(1)
args = input_str.split()
if len(args) is 0: # Let bot decide action and time
if len(args) == 0: # Let bot decide action and time
scam_action = choice(options)
scam_time = randint(30, 60)
elif len(args) is 1: # User decides time/action, bot decides the other.
elif len(args) == 1: # User decides time/action, bot decides the other.
try:
scam_action = str(args[0]).lower()
scam_time = randint(30, 60)
except ValueError:
scam_action = choice(options)
scam_time = int(args[0])
elif len(args) is 2: # User decides both action and time
elif len(args) == 2: # User decides both action and time
scam_action = str(args[0]).lower()
scam_time = int(args[1])
else:
Expand Down

0 comments on commit 88a9d66

Please sign in to comment.