Showing 97 of 154 total issues
Avoid deeply nested control flow statements. Open
Open
if result['ok'] is True or result['ok'] == 'True':
text = _("User %s muted on chat %s") % (user_id,
chat_id)
else:
text = _("Error muting user %s from chat %s: %s") % (
Avoid deeply nested control flow statements. Open
Open
if len(newadmin) != 0:
stampy.plugin.config.setconfig(key='admin',
value=newadmin, gid=id)
else:
stampy.plugin.config.deleteconfig(key='admin', gid=id)
Avoid deeply nested control flow statements. Open
Open
if code:
gidstoping.append(chat_id)
feedsupdated.append({'name': name, 'gid': gid,
'dateitem': dateitemfor})
Avoid deeply nested control flow statements. Open
Open
if key in validkeys or gid == 0:
value = "=".join(word.split('=')[1:])
setconfig(key=key, value=value, gid=gid)
text = _("Setting config for `%s` to `%s`") % (key, value)
else:
Avoid deeply nested control flow statements. Open
Open
if result['ok'] is True or result['ok'] == 'True':
text = _("Users %s deoped on chat %s") % (user_id, chat_id)
else:
text = _("Error deoping users from chat %s: %s") % (chat_id, result)
Avoid deeply nested control flow statements. Open
Open
if len(word) == 2:
oper = word[-2:]
try:
word = msgdetail["replyto"].lower()
except:
Avoid deeply nested control flow statements. Open
Open
if result['ok'] is True or result['ok'] == 'True':
text = _("User %s unbanned out of chat %s") % (user_id, chat_id)
else:
text = _("Error unbanning user %s from chat %s: %s") % (user_id, chat_id, result['description'])
stampy.stampy.sendmessage(chat_id=chat_id, text=text, reply_to_message_id=message_id, disable_web_page_preview=True, parse_mode="Markdown")
Avoid deeply nested control flow statements. Open
Open
if token:
chanlinkslave(message=message, token=token)
except:
Avoid deeply nested control flow statements. Open
Open
if url and 'USA-' in title:
url = url = "https://us-redhat.icims.com/jobs/%s/job?iis=A+Red+Hat+Employee&iispid=21098" % jobid
Avoid deeply nested control flow statements. Open
Open
if gid > 0: # user private chat
validkeys = ['language', 'currency', 'modulo',
'stock', 'espp', 'cleanlink', 'cleankey']
elif gid < 0: # group chat or channel
validkeys = ['language', 'currency', 'modulo',
Avoid deeply nested control flow statements. Open
Open
if key == 'gid':
value = texto.split('=')[1:][0].lower()
text = _("Setting gid for sudo to `%s`") % value
stampy.stampy.sendmessage(chat_id=chat_id, text=text,
reply_to_message_id=message_id,
Avoid deeply nested control flow statements. Open
Open
if command == trigger[1:]:
runplugin = True
break
elif trigger in texto:
Avoid deeply nested control flow statements. Open
Open
if result['ok'] is True or result['ok'] == 'True':
text = _("Users opped on chat %s") % chat_id
else:
text = _("Error opping users from chat %s: %s") % (chat_id, result)
Avoid deeply nested control flow statements. Open
Open
if result['ok'] is True or result['ok'] == 'True':
text = _("User %s oped on chat %s") % (user_id, chat_id)
else:
text = _("Error oping user %s from chat %s: %s") % (user_id, chat_id, result)
Avoid deeply nested control flow statements. Open
Open
if newurl != url:
delete = True
# Check if url has to be cleaned
if cleankey:
Avoid deeply nested control flow statements. Open
Open
for item in word:
if stampy.plugin.alias.getalias(item, gid=gid):
item = stampy.plugin.alias.getalias(item, gid=gid)
if oper == "++" and item not in wordadd:
wordadd.append(item)
Avoid deeply nested control flow statements. Open
Open
if stampy.plugin.config.config(key='sudo'):
# "=" was not in first command, so consider a command to use as 'sudo'
# It is a new list, with unique message, so we can alter it
stampy.plugin.config.setconfig(key='overridegid', gid=0, value=message['message']['chat']['id'])
Avoid deeply nested control flow statements. Open
Open
if "@" in each:
username = each[1:-1]
if username and username != "@":
Avoid deeply nested control flow statements. Open
Open
if result['ok'] is True or result['ok'] == 'True':
text = _("User %s unmuted on chat %s") % (user_id, chat_id)
else:
text = _("Error unmuting %s from chat %s: %s") % (
user_id, chat_id, result)
Avoid deeply nested control flow statements. Open
Open
if result['ok'] is True or result['ok'] == 'True':
text = _("User %s information: %s") % (user_id, result['result'])
else:
text = _("Error querying user %s information: %s") % (user_id, result)