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

Sourcery refactored master branch #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

sourcery-ai[bot]
Copy link

@sourcery-ai sourcery-ai bot commented Jun 28, 2020

Branch master refactored by Sourcery.

If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

Review changes via command line

To manually merge these changes, make sure you're on the master branch, then run:

git fetch origin sourcery/master
git merge --ff-only FETCH_HEAD
git reset HEAD^

Copy link
Author

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Due to GitHub API limits, only the first 60 comments can be shown.

Comment on lines -9 to +11
class Config(object):


class Config((object)):
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines 9-80 refactored with the following changes:

  • Replace list(), dict() or set() with comprehension (collection-builtin-to-comprehension)

for p in props:
if not p in dic:
return False
return True
return all(p in dic for p in props)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function Main.dict_has_props refactored with the following changes:

  • Use any() instead of for loop (use-any)
  • Invert any/all to simplify comparisons (invert-any-all)

Comment on lines -146 to -147
buffer_size = self.options.buffer

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function Main.request_download refactored with the following changes:

  • Move assignments closer to their usage (move-assign)

Comment on lines -355 to +352
if not file_name is None:
if file_name is not None:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function Main.download refactored with the following changes:

  • Simplify logical expression using De Morgan identities (de-morgan)

if not (str(event.chat_id) in CHAT_FLOOD):
if str(event.chat_id) not in CHAT_FLOOD:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function _ refactored with the following changes:

  • Simplify logical expression using De Morgan identities (de-morgan)

Comment on lines -47 to +50
await event.delete()
else:
await event.reply(help_string + "\n\n" + s_help_string)
await event.delete()

await event.delete()
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function _ refactored with the following changes:

  • Hoist repeated code outside conditional statement (hoist-statement-from-if)

if "\\n" in names:
if "\\n" in first_name:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function _ refactored with the following changes:

  • Use previously assigned local variable (use-assigned-variable)

Comment on lines -46 to +66
@borg.on(events.NewMessage(pattern=r"\.afk ?(.*)", outgoing=True))
@borg.on(events.NewMessage(pattern=r"\.afk ?(.*)", outgoing=True))
async def _(event):
if event.fwd_from:
return
global USER_AFK
global afk_time
global last_afk_message
global USER_AFK
global afk_time
global last_afk_message
global reason
USER_AFK = {}
afk_time = datetime.datetime.now()
last_afk_message = {}
reason = event.pattern_match.group(1)
if not USER_AFK:
reason = event.pattern_match.group(1)
last_seen_status = await borg(
functions.account.GetPrivacyRequest(
types.InputPrivacyKeyStatusTimestamp()
)
)
if isinstance(last_seen_status.rules, types.PrivacyValueAllowAll):
afk_time = datetime.datetime.now()
USER_AFK = f"yes: {reason}"
afk_time = datetime.datetime.now()
USER_AFK = f"yes: {reason}"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function _ refactored with the following changes:

  • Move assignments closer to their usage (move-assign)

Comment on lines -89 to +91
global USER_AFK
global afk_time
global last_afk_message
global USER_AFK
global afk_time
global last_afk_message
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function on_afk refactored with the following changes:

  • Replace assignment with augmented assignment (aug-assign)

output = "output.txt"
downloads = aria2.get_downloads()
downloads = aria2.get_downloads()
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function show_all refactored with the following changes:

  • Move assignments closer to their usage (move-assign)

Comment on lines -25 to +79
CARBONLANG = "en"
textx = await e.get_reply_message()
pcode = e.text
if pcode[8:]:
pcode = str(pcode[8:])
elif textx:
pcode = str(textx.message) # Importing message to module
code = quote_plus(pcode) # Converting to urlencoded
url = CARBON.format(code=code, lang=CARBONLANG)
chrome_options = Options()
chrome_options.add_argument("--headless")
chrome_options.binary_location = Config.GOOGLE_CHROME_BIN
chrome_options.add_argument("--window-size=1920x1080")
chrome_options.add_argument("--disable-dev-shm-usage")
chrome_options.add_argument("--no-sandbox")
chrome_options.add_argument('--disable-gpu')
prefs = {'download.default_directory' : './'}
chrome_options.add_experimental_option('prefs', prefs)
await e.edit("⬛⬛⬜⬜⬜ 30%")
if e.text[0].isalpha() or e.text[0] in ("/", "#", "@", "!"):
return

driver = webdriver.Chrome(executable_path=Config.GOOGLE_CHROME_DRIVER, options=chrome_options)
driver.get(url)
download_path = './'
driver.command_executor._commands["send_command"] = ("POST", '/session/$sessionId/chromium/send_command')
params = {'cmd': 'Page.setDownloadBehavior', 'params': {'behavior': 'allow', 'downloadPath': download_path}}
command_result = driver.execute("send_command", params)
""" A Wrapper for carbon.now.sh """
await e.edit("⬜⬜⬜⬜⬜ 00%")
CARBON = 'https://carbon.now.sh/?l={lang}&code={code}'
CARBONLANG = "en"
textx = await e.get_reply_message()
pcode = e.text
if pcode[8:]:
pcode = str(pcode[8:])
elif textx:
pcode = str(textx.message) # Importing message to module
code = quote_plus(pcode) # Converting to urlencoded
url = CARBON.format(code=code, lang=CARBONLANG)
chrome_options = Options()
chrome_options.add_argument("--headless")
chrome_options.binary_location = Config.GOOGLE_CHROME_BIN
chrome_options.add_argument("--window-size=1920x1080")
chrome_options.add_argument("--disable-dev-shm-usage")
chrome_options.add_argument("--no-sandbox")
chrome_options.add_argument('--disable-gpu')
prefs = {'download.default_directory' : './'}
chrome_options.add_experimental_option('prefs', prefs)
await e.edit("⬛⬛⬜⬜⬜ 30%")

driver.find_element_by_xpath("//button[contains(text(),'Export')]").click()
sleep(5) # this might take a bit.
driver.find_element_by_xpath("//button[contains(text(),'4x')]").click()
sleep(5)
await e.edit("⬛⬛⬛⬜⬜ 50%")
driver.find_element_by_xpath("//button[contains(text(),'PNG')]").click()
sleep(5) #Waiting for downloading
driver = webdriver.Chrome(executable_path=Config.GOOGLE_CHROME_DRIVER, options=chrome_options)
driver.get(url)
download_path = './'
driver.command_executor._commands["send_command"] = ("POST", '/session/$sessionId/chromium/send_command')
params = {'cmd': 'Page.setDownloadBehavior', 'params': {'behavior': 'allow', 'downloadPath': download_path}}
command_result = driver.execute("send_command", params)

await e.edit("⬛⬛⬛⬛⬛ 100%")
file = './carbon.png'
await e.edit("✅Carbon Completed, Uploading Carbon✅")
await e.client.send_file(
e.chat_id,
file,
caption="Carbon by [@NeoMatrix90](https://t.me/NeoMatrix90)/",
force_document=True,
reply_to=e.message.reply_to_msg_id,
)
driver.find_element_by_xpath("//button[contains(text(),'Export')]").click()
sleep(5) # this might take a bit.
driver.find_element_by_xpath("//button[contains(text(),'4x')]").click()
sleep(5)
await e.edit("⬛⬛⬛⬜⬜ 50%")
driver.find_element_by_xpath("//button[contains(text(),'PNG')]").click()
sleep(5) #Waiting for downloading

os.remove('./carbon.png')
# Removing carbon.png after uploading
await e.delete() # Deleting msg
await e.edit("⬛⬛⬛⬛⬛ 100%")
file = './carbon.png'
await e.edit("✅Carbon Completed, Uploading Carbon✅")
await e.client.send_file(
e.chat_id,
file,
caption="Carbon by [@NeoMatrix90](https://t.me/NeoMatrix90)/",
force_document=True,
reply_to=e.message.reply_to_msg_id,
)

os.remove('./carbon.png')
# Removing carbon.png after uploading
await e.delete() # Deleting msg
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function carbon_api refactored with the following changes:

  • Add guard clause (last-if-guard)

elif type_of_group == "g" or type_of_group == "c":
elif type_of_group in ["g", "c"]:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function _ refactored with the following changes:

  • Replace multiple comparisons of same variable with in operator (merge-comparisons)

Comment on lines -100 to -101
CHUNK_SIZE = 2341
downloaded = 0
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function download_coroutine refactored with the following changes:

  • Remove redundant pass statement (remove-redundant-pass)
  • Move assignments closer to their usage (move-assign)

animation_ttl = range(0, 16)
animation_ttl = range(16)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function _ refactored with the following changes:

  • Replace range(0, x) with range(x) (remove-zero-from-range)

@@ -43,7 +43,6 @@ async def _(event):
new_required_file_name = ""
new_required_file_caption = ""
command_to_run = []
force_document = False
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function _ refactored with the following changes:

  • Move assignments closer to their usage (move-assign)

download_url = response.get("webContentLink")
return download_url
return response.get("webContentLink")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function upload_file refactored with the following changes:

  • Inline variable that is immediately returned (inline-immediately-returned-variable)

Comment on lines -94 to +99
BASE_URL = "http://www.google.com"
OUTPUT_STR = "Reply to an image to do Google Reverse Search"
if event.reply_to_msg_id:
await event.edit("Pre Processing Media")
previous_message = await event.get_reply_message()
previous_message_text = previous_message.message
BASE_URL = "http://www.google.com"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function _ refactored with the following changes:

  • Move assignments closer to their usage (move-assign)

Comment on lines -25 to +99
if info:
mov_country = []
mov_language = []
for node in info:
a = node.findAll('a')
for i in a:
if "country_of_origin" in i['href']:
mov_country.append(i.text)
elif "primary_language" in i['href']:
mov_language.append(i.text)
if soup.findAll('div',"ratingValue"):
for r in soup.findAll('div',"ratingValue"):
mov_rating = r.strong['title']
else:
mov_rating = 'Not available'
await e.edit('<a href='+poster+'>&#8203;</a>'
'<b>Title : </b><code>'+mov_title+
'</code>\n<code>'+mov_details+
'</code>\n<b>Rating : </b><code>'+mov_rating+
'</code>\n<b>Country : </b><code>'+mov_country[0]+
'</code>\n<b>Language : </b><code>'+mov_language[0]+
'</code>\n<b>Director : </b><code>'+director+
'</code>\n<b>Writer : </b><code>'+writer+
'</code>\n<b>Stars : </b><code>'+stars+
'</code>\n<b>IMDB Url : </b>'+mov_link+
'\n<b>Story Line : </b>'+story_line,
link_preview = True , parse_mode = 'HTML'
)
movie_name = e.pattern_match.group(1)
remove_space = movie_name.split(' ')
final_name = '+'.join(remove_space)
page = requests.get("https://www.imdb.com/find?ref_=nv_sr_fn&q="+final_name+"&s=all")
lnk = str(page.status_code)
soup = bs4.BeautifulSoup(page.content,'lxml')
odds = soup.findAll("tr","odd")
mov_title = odds[0].findNext('td').findNext('td').text
mov_link = "http://www.imdb.com/"+odds[0].findNext('td').findNext('td').a['href']
page1 = requests.get(mov_link)
soup = bs4.BeautifulSoup(page1.content,'lxml')
if soup.find('div','poster'):
poster = soup.find('div','poster').img['src']
else:
poster = ''
if soup.find('div','title_wrapper'):
pg = soup.find('div','title_wrapper').findNext('div').text
mov_details = re.sub(r'\s+',' ',pg)
else:
mov_details = ''
credits = soup.findAll('div', 'credit_summary_item')
director = credits[0].a.text
if len(credits)==1:
writer = 'Not available'
stars = 'Not available'
elif len(credits)>2:
writer = credits[1].a.text
actors = []
for x in credits[2].findAll('a'):
actors.append(x.text)
actors.pop()
stars = actors[0]+','+actors[1]+','+actors[2]
else:
writer = 'Not available'
actors = []
for x in credits[1].findAll('a'):
actors.append(x.text)
actors.pop()
stars = actors[0]+','+actors[1]+','+actors[2]
if soup.find('div', "inline canwrap"):
story_line = soup.find('div', "inline canwrap").findAll('p')[0].text
else:
story_line = 'Not available'
info = soup.findAll('div', "txt-block")
if info:
mov_country = []
mov_language = []
for node in info:
a = node.findAll('a')
for i in a:
if "country_of_origin" in i['href']:
mov_country.append(i.text)
elif "primary_language" in i['href']:
mov_language.append(i.text)
if soup.findAll('div',"ratingValue"):
for r in soup.findAll('div',"ratingValue"):
mov_rating = r.strong['title']
else:
mov_rating = 'Not available'
await e.edit('<a href='+poster+'>&#8203;</a>'
'<b>Title : </b><code>'+mov_title+
'</code>\n<code>'+mov_details+
'</code>\n<b>Rating : </b><code>'+mov_rating+
'</code>\n<b>Country : </b><code>'+mov_country[0]+
'</code>\n<b>Language : </b><code>'+mov_language[0]+
'</code>\n<b>Director : </b><code>'+director+
'</code>\n<b>Writer : </b><code>'+writer+
'</code>\n<b>Stars : </b><code>'+stars+
'</code>\n<b>IMDB Url : </b>'+mov_link+
'\n<b>Story Line : </b>'+story_line,
link_preview = True , parse_mode = 'HTML'
)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function imdb refactored with the following changes:

  • Hoist repeated code outside conditional statement (hoist-statement-from-if)

@@ -27,7 +27,6 @@ async def _(event):
))
except Exception as e:
await event.reply(str(e))
await event.edit("Invited Successfully")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function _ refactored with the following changes:

  • Hoist repeated code outside conditional statement (hoist-statement-from-if)

Comment on lines -49 to +57
if Config.NC_LOG_P_M_S:
if event.is_private:
if chat.id not in NO_PM_LOG_USERS:
NO_PM_LOG_USERS.append(chat.id)
await event.edit("Won't Log Messages from this chat")
await asyncio.sleep(3)
await event.delete()
if (
Config.NC_LOG_P_M_S
and event.is_private
and chat.id not in NO_PM_LOG_USERS
):
NO_PM_LOG_USERS.append(chat.id)
await event.edit("Won't Log Messages from this chat")
await asyncio.sleep(3)
await event.delete()
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function approve_p_m refactored with the following changes:

  • Merge nested if conditions (merge-nested-ifs)

Comment on lines -78 to +104
languages = {}
languages["English"] = "eng"
languages["Arabic"] = "ara"
languages["Bulgarian"] = "bul"
languages["Chinese (Simplified)"] = "chs"
languages["Chinese (Traditional)"] = "cht"
languages["Croatian"] = "hrv"
languages["Czech"] = "cze"
languages["Danish"] = "dan"
languages["Dutch"] = "dut"
languages["Finnish"] = "fin"
languages["French"] = "fre"
languages["German"] = "ger"
languages["Greek"] = "gre"
languages["Hungarian"] = "hun"
languages["Korean"] = "kor"
languages["Italian"] = "ita"
languages["Japanese"] = "jpn"
languages["Polish"] = "pol"
languages["Portuguese"] = "por"
languages["Russian"] = "rus"
languages["Slovenian"] = "slv"
languages["Spanish"] = "spa"
languages["Swedish"] = "swe"
languages["Turkish"] = "tur"
languages = {
"English": "eng",
"Arabic": "ara",
"Bulgarian": "bul",
"Chinese (Simplified)": "chs",
"Chinese (Traditional)": "cht",
"Croatian": "hrv",
"Czech": "cze",
"Danish": "dan",
"Dutch": "dut",
"Finnish": "fin",
"French": "fre",
"German": "ger",
"Greek": "gre",
"Hungarian": "hun",
"Korean": "kor",
"Italian": "ita",
"Japanese": "jpn",
"Polish": "pol",
"Portuguese": "por",
"Russian": "rus",
"Slovenian": "slv",
"Spanish": "spa",
"Swedish": "swe",
"Turkish": "tur",
}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function get_ocr_languages refactored with the following changes:

  • Merge dictionary assignment with declaration (merge-dict-assign)

if reply_message.media is None:
await event.edit("Please reply to a media_type == @gPoll to view the questions and answers")
elif reply_message.media.poll is None:
if reply_message.media is None or reply_message.media.poll is None:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function _ refactored with the following changes:

  • Merge duplicate blocks in conditional (merge-duplicate-blocks)
  • Remove redundant conditional (remove-redundant-if)

i = i + 1
i += 1
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function _ refactored with the following changes:

  • Replace assignment with augmented assignment (aug-assign)

@@ -35,7 +35,6 @@

@borg.on(admin_cmd(pattern="remove\.bg ?(.*)"))
async def _(event):
HELP_STR = "`.remove.bg` as reply to a media, or give a link as an argument to this command"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function _ refactored with the following changes:

  • Move assignments closer to their usage (move-assign)

Comment on lines -98 to -105
r = requests.post(
return requests.post(
"https://api.remove.bg/v1.0/removebg",
headers=headers,
files=files,
allow_redirects=True,
stream=True
)
return r
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function ReTrieveFile refactored with the following changes:

  • Inline variable that is immediately returned (inline-immediately-returned-variable)

p = p + 1
p += 1
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function _ refactored with the following changes:

  • Replace assignment with augmented assignment (aug-assign)

u = u + 1
u += 1
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function _ refactored with the following changes:

  • Replace assignment with augmented assignment (aug-assign)

await mone.edit("Found `{}` in {} seconds.".format(input_str, ms))
await mone.edit("Found `{}` in {} seconds.".format(required_file_name, ms))
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function _ refactored with the following changes:

  • Move assignments closer to their usage (move-assign)
  • Use previously assigned local variable (use-assigned-variable)

Comment on lines -15 to +52
if not show.text[0].isalpha() and show.text[0] not in ("/", "#", "@", "!"):
if not show.is_group:
await show.edit("Are you sure this is a group?")
return
info = await show.client.get_entity(show.chat_id)
title = info.title if info.title else "this chat"
mentions = 'Users in {}: \n'.format(title)
try:
if not show.pattern_match.group(1):
async for user in show.client.iter_participants(show.chat_id):
if not user.deleted:
mentions += f"\n[{user.first_name}](tg://user?id={user.id}) `{user.id}`"
else:
mentions += f"\nDeleted Account `{user.id}`"
else:
searchq = show.pattern_match.group(1)
async for user in show.client.iter_participants(show.chat_id, search=f'{searchq}'):
if not user.deleted:
mentions += f"\n[{user.first_name}](tg://user?id={user.id}) `{user.id}`"
else:
mentions += f"\nDeleted Account `{user.id}`"
except ChatAdminRequiredError as err:
mentions += " " + str(err) + "\n"
try:
await show.edit(mentions)
except MessageTooLongError:
await show.edit("Damn, this is a huge group. Uploading users lists as file.")
file = open("userslist.txt", "w+")
file.write(mentions)
file.close()
await show.client.send_file(
show.chat_id,
"userslist.txt",
caption='Users in {}'.format(title),
reply_to=show.id,
)
remove("userslist.txt")
if show.text[0].isalpha() or show.text[0] in ("/", "#", "@", "!"):
return
if not show.is_group:
await show.edit("Are you sure this is a group?")
return
info = await show.client.get_entity(show.chat_id)
title = info.title if info.title else "this chat"
mentions = 'Users in {}: \n'.format(title)
try:
if show.pattern_match.group(1):
searchq = show.pattern_match.group(1)
async for user in show.client.iter_participants(show.chat_id, search=f'{searchq}'):
if user.deleted:
mentions += f"\nDeleted Account `{user.id}`"
else:
mentions += f"\n[{user.first_name}](tg://user?id={user.id}) `{user.id}`"
else:
async for user in show.client.iter_participants(show.chat_id):
if not user.deleted:
mentions += f"\n[{user.first_name}](tg://user?id={user.id}) `{user.id}`"
else:
mentions += f"\nDeleted Account `{user.id}`"
except ChatAdminRequiredError as err:
mentions += " " + str(err) + "\n"
try:
await show.edit(mentions)
except MessageTooLongError:
await show.edit("Damn, this is a huge group. Uploading users lists as file.")
file = open("userslist.txt", "w+")
file.write(mentions)
file.close()
await show.client.send_file(
show.chat_id,
"userslist.txt",
caption='Users in {}'.format(title),
reply_to=show.id,
)
remove("userslist.txt")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function get_users refactored with the following changes:

  • Add guard clause (last-if-guard)

Comment on lines -37 to -39
else:
pass

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function _ refactored with the following changes:

  • Remove redundant pass statement (remove-redundant-pass)

@pep8speaks
Copy link

Hello @sourcery-ai[bot]! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 73:1: W191 indentation contains tabs
Line 161:1: W191 indentation contains tabs
Line 352:1: W191 indentation contains tabs

Line 32:80: E501 line too long (112 > 79 characters)

Line 187:80: E501 line too long (83 > 79 characters)

Line 11:1: E303 too many blank lines (6)

Line 110:1: W191 indentation contains tabs
Line 118:1: W191 indentation contains tabs
Line 121:1: W191 indentation contains tabs
Line 122:1: W191 indentation contains tabs

Line 25:2: E111 indentation is not a multiple of four
Line 26:3: E111 indentation is not a multiple of four
Line 28:2: E111 indentation is not a multiple of four
Line 29:2: E111 indentation is not a multiple of four
Line 30:2: E111 indentation is not a multiple of four
Line 31:2: E111 indentation is not a multiple of four
Line 32:2: E111 indentation is not a multiple of four
Line 33:2: E111 indentation is not a multiple of four
Line 34:2: E111 indentation is not a multiple of four
Line 35:8: E111 indentation is not a multiple of four
Line 35:8: E117 over-indented
Line 36:2: E111 indentation is not a multiple of four
Line 37:8: E111 indentation is not a multiple of four
Line 37:8: E117 over-indented
Line 37:34: E261 at least two spaces before inline comment
Line 38:2: E111 indentation is not a multiple of four
Line 38:26: E261 at least two spaces before inline comment
Line 39:2: E111 indentation is not a multiple of four
Line 40:2: E111 indentation is not a multiple of four
Line 41:2: E111 indentation is not a multiple of four
Line 42:2: E111 indentation is not a multiple of four
Line 43:2: E111 indentation is not a multiple of four
Line 44:2: E111 indentation is not a multiple of four
Line 45:2: E111 indentation is not a multiple of four
Line 46:2: E111 indentation is not a multiple of four
Line 47:2: E111 indentation is not a multiple of four
Line 47:39: E203 whitespace before ':'
Line 48:2: E111 indentation is not a multiple of four
Line 49:2: E111 indentation is not a multiple of four
Line 51:2: E111 indentation is not a multiple of four
Line 51:80: E501 line too long (95 > 79 characters)
Line 52:2: E111 indentation is not a multiple of four
Line 53:2: E111 indentation is not a multiple of four
Line 54:2: E111 indentation is not a multiple of four
Line 54:80: E501 line too long (106 > 79 characters)
Line 55:2: E111 indentation is not a multiple of four
Line 55:80: E501 line too long (109 > 79 characters)
Line 56:2: E111 indentation is not a multiple of four
Line 58:2: E111 indentation is not a multiple of four
Line 59:2: E111 indentation is not a multiple of four
Line 59:10: E261 at least two spaces before inline comment
Line 60:2: E111 indentation is not a multiple of four
Line 61:2: E111 indentation is not a multiple of four
Line 62:2: E111 indentation is not a multiple of four
Line 63:2: E111 indentation is not a multiple of four
Line 64:2: E111 indentation is not a multiple of four
Line 64:10: E261 at least two spaces before inline comment
Line 64:11: E262 inline comment should start with '# '
Line 66:2: E111 indentation is not a multiple of four
Line 67:2: E111 indentation is not a multiple of four
Line 68:2: E111 indentation is not a multiple of four
Line 69:2: E111 indentation is not a multiple of four
Line 77:2: E111 indentation is not a multiple of four
Line 78:2: E114 indentation is not a multiple of four (comment)
Line 79:2: E111 indentation is not a multiple of four
Line 79:18: E261 at least two spaces before inline comment

Line 129:49: E117 over-indented
Line 129:80: E501 line too long (88 > 79 characters)
Line 135:29: E122 continuation line missing indentation or outdented
Line 136:29: E122 continuation line missing indentation or outdented
Line 137:29: E122 continuation line missing indentation or outdented
Line 138:29: E122 continuation line missing indentation or outdented
Line 139:29: E122 continuation line missing indentation or outdented
Line 140:25: E122 continuation line missing indentation or outdented
Line 141:80: E501 line too long (86 > 79 characters)
Line 142:80: E501 line too long (85 > 79 characters)
Line 143:80: E501 line too long (85 > 79 characters)

Line 90:80: E501 line too long (87 > 79 characters)

Line 81:38: E231 missing whitespace after ','

Line 46:80: E501 line too long (94 > 79 characters)

Line 25:1: E302 expected 2 blank lines, found 1
Line 28:3: E111 indentation is not a multiple of four
Line 29:3: E111 indentation is not a multiple of four
Line 30:3: E111 indentation is not a multiple of four
Line 31:3: E111 indentation is not a multiple of four
Line 31:80: E501 line too long (87 > 79 characters)
Line 32:3: E111 indentation is not a multiple of four
Line 33:3: E111 indentation is not a multiple of four
Line 33:40: E231 missing whitespace after ','
Line 34:3: E111 indentation is not a multiple of four
Line 34:27: E231 missing whitespace after ','
Line 35:3: E111 indentation is not a multiple of four
Line 36:3: E111 indentation is not a multiple of four
Line 36:80: E501 line too long (83 > 79 characters)
Line 37:3: E111 indentation is not a multiple of four
Line 38:3: E111 indentation is not a multiple of four
Line 38:41: E231 missing whitespace after ','
Line 39:3: E111 indentation is not a multiple of four
Line 39:21: E231 missing whitespace after ','
Line 40:3: E101 indentation contains mixed spaces and tabs
Line 40:3: W191 indentation contains tabs
Line 40:4: E117 over-indented
Line 40:28: E231 missing whitespace after ','
Line 41:3: E111 indentation is not a multiple of four
Line 42:3: E101 indentation contains mixed spaces and tabs
Line 42:3: W191 indentation contains tabs
Line 42:4: E117 over-indented
Line 43:3: E111 indentation is not a multiple of four
Line 43:21: E231 missing whitespace after ','
Line 44:3: E101 indentation contains mixed spaces and tabs
Line 44:3: W191 indentation contains tabs
Line 44:4: E117 over-indented
Line 44:24: E231 missing whitespace after ','
Line 45:3: E101 indentation contains mixed spaces and tabs
Line 45:3: W191 indentation contains tabs
Line 45:31: E231 missing whitespace after ','
Line 45:35: E231 missing whitespace after ','
Line 46:3: E111 indentation is not a multiple of four
Line 47:3: E101 indentation contains mixed spaces and tabs
Line 47:3: W191 indentation contains tabs
Line 47:4: E117 over-indented
Line 48:3: E111 indentation is not a multiple of four
Line 49:3: E111 indentation is not a multiple of four
Line 50:3: E111 indentation is not a multiple of four
Line 50:18: E225 missing whitespace around operator
Line 51:4: E111 indentation is not a multiple of four
Line 52:4: E111 indentation is not a multiple of four
Line 53:3: E111 indentation is not a multiple of four
Line 53:20: E225 missing whitespace around operator
Line 54:4: E111 indentation is not a multiple of four
Line 55:4: E111 indentation is not a multiple of four
Line 56:4: E111 indentation is not a multiple of four
Line 57:4: E101 indentation contains mixed spaces and tabs
Line 57:4: W191 indentation contains tabs
Line 57:5: E117 over-indented
Line 58:4: E111 indentation is not a multiple of four
Line 59:4: E111 indentation is not a multiple of four
Line 60:3: E111 indentation is not a multiple of four
Line 61:4: E111 indentation is not a multiple of four
Line 62:4: E111 indentation is not a multiple of four
Line 63:4: E111 indentation is not a multiple of four
Line 64:4: E101 indentation contains mixed spaces and tabs
Line 64:4: W191 indentation contains tabs
Line 64:5: E117 over-indented
Line 65:4: E111 indentation is not a multiple of four
Line 66:4: E111 indentation is not a multiple of four
Line 67:3: E111 indentation is not a multiple of four
Line 68:3: E101 indentation contains mixed spaces and tabs
Line 68:3: W191 indentation contains tabs
Line 68:4: E117 over-indented
Line 69:3: E111 indentation is not a multiple of four
Line 70:3: E101 indentation contains mixed spaces and tabs
Line 70:3: W191 indentation contains tabs
Line 70:4: E117 over-indented
Line 71:3: E111 indentation is not a multiple of four
Line 72:3: E111 indentation is not a multiple of four
Line 73:3: E101 indentation contains mixed spaces and tabs
Line 73:3: W191 indentation contains tabs
Line 73:4: E117 over-indented
Line 74:3: E101 indentation contains mixed spaces and tabs
Line 74:3: W191 indentation contains tabs
Line 75:3: E101 indentation contains mixed spaces and tabs
Line 75:3: W191 indentation contains tabs
Line 76:3: E101 indentation contains mixed spaces and tabs
Line 76:3: W191 indentation contains tabs
Line 76:5: E117 over-indented
Line 77:3: E101 indentation contains mixed spaces and tabs
Line 77:3: W191 indentation contains tabs
Line 78:3: E101 indentation contains mixed spaces and tabs
Line 78:3: W191 indentation contains tabs
Line 78:6: E117 over-indented
Line 79:3: E101 indentation contains mixed spaces and tabs
Line 79:3: W191 indentation contains tabs
Line 79:7: E117 over-indented
Line 80:3: E101 indentation contains mixed spaces and tabs
Line 80:3: W191 indentation contains tabs
Line 81:3: E101 indentation contains mixed spaces and tabs
Line 81:3: W191 indentation contains tabs
Line 81:7: E117 over-indented
Line 82:3: E111 indentation is not a multiple of four
Line 82:24: E231 missing whitespace after ','
Line 83:3: E101 indentation contains mixed spaces and tabs
Line 83:3: W191 indentation contains tabs
Line 83:4: E117 over-indented
Line 83:31: E231 missing whitespace after ','
Line 84:3: E101 indentation contains mixed spaces and tabs
Line 84:3: W191 indentation contains tabs
Line 84:5: E117 over-indented
Line 85:3: E111 indentation is not a multiple of four
Line 86:3: E101 indentation contains mixed spaces and tabs
Line 86:3: W191 indentation contains tabs
Line 86:4: E117 over-indented
Line 87:3: E111 indentation is not a multiple of four
Line 88:3: E101 indentation contains mixed spaces and tabs
Line 88:3: W191 indentation contains tabs
Line 88:6: E128 continuation line under-indented for visual indent
Line 88:39: E225 missing whitespace around operator
Line 89:3: E101 indentation contains mixed spaces and tabs
Line 89:3: W191 indentation contains tabs
Line 89:6: E128 continuation line under-indented for visual indent
Line 89:35: E225 missing whitespace around operator
Line 90:3: E101 indentation contains mixed spaces and tabs
Line 90:3: W191 indentation contains tabs
Line 90:6: E128 continuation line under-indented for visual indent
Line 90:50: E225 missing whitespace around operator
Line 91:3: E101 indentation contains mixed spaces and tabs
Line 91:3: W191 indentation contains tabs
Line 91:6: E128 continuation line under-indented for visual indent
Line 91:55: E225 missing whitespace around operator
Line 92:3: E101 indentation contains mixed spaces and tabs
Line 92:3: W191 indentation contains tabs
Line 92:6: E128 continuation line under-indented for visual indent
Line 92:57: E225 missing whitespace around operator
Line 93:3: E101 indentation contains mixed spaces and tabs
Line 93:3: W191 indentation contains tabs
Line 93:6: E128 continuation line under-indented for visual indent
Line 93:50: E225 missing whitespace around operator
Line 94:3: E101 indentation contains mixed spaces and tabs
Line 94:3: W191 indentation contains tabs
Line 94:6: E128 continuation line under-indented for visual indent
Line 94:46: E225 missing whitespace around operator
Line 95:3: E101 indentation contains mixed spaces and tabs
Line 95:3: W191 indentation contains tabs
Line 95:6: E128 continuation line under-indented for visual indent
Line 95:44: E225 missing whitespace around operator
Line 96:3: E101 indentation contains mixed spaces and tabs
Line 96:3: W191 indentation contains tabs
Line 96:6: E128 continuation line under-indented for visual indent
Line 96:44: E225 missing whitespace around operator
Line 97:3: E101 indentation contains mixed spaces and tabs
Line 97:3: W191 indentation contains tabs
Line 97:6: E128 continuation line under-indented for visual indent
Line 98:3: E101 indentation contains mixed spaces and tabs
Line 98:3: W191 indentation contains tabs
Line 98:6: E128 continuation line under-indented for visual indent
Line 98:18: E251 unexpected spaces around keyword / parameter equals
Line 98:20: E251 unexpected spaces around keyword / parameter equals
Line 98:25: E203 whitespace before ','
Line 98:38: E251 unexpected spaces around keyword / parameter equals
Line 98:40: E251 unexpected spaces around keyword / parameter equals
Line 99:3: E101 indentation contains mixed spaces and tabs
Line 99:3: W191 indentation contains tabs
Line 99:6: E124 closing bracket does not match visual indentation

Line 67:80: E501 line too long (100 > 79 characters)

Line 14:7: E111 indentation is not a multiple of four
Line 18:4: E111 indentation is not a multiple of four
Line 24:4: E111 indentation is not a multiple of four
Line 82:4: E111 indentation is not a multiple of four
Line 84:4: E111 indentation is not a multiple of four
Line 85:7: E111 indentation is not a multiple of four
Line 86:7: E111 indentation is not a multiple of four
Line 87:4: E111 indentation is not a multiple of four
Line 88:4: E111 indentation is not a multiple of four
Line 89:7: E111 indentation is not a multiple of four
Line 90:7: E111 indentation is not a multiple of four
Line 91:4: E111 indentation is not a multiple of four
Line 92:4: E111 indentation is not a multiple of four
Line 93:4: E111 indentation is not a multiple of four
Line 94:7: E111 indentation is not a multiple of four
Line 95:7: E111 indentation is not a multiple of four
Line 96:4: E111 indentation is not a multiple of four
Line 97:4: E111 indentation is not a multiple of four
Line 98:10: E111 indentation is not a multiple of four
Line 98:10: E117 over-indented
Line 98:14: W291 trailing whitespace
Line 99:14: E111 indentation is not a multiple of four
Line 99:72: E231 missing whitespace after ','
Line 99:80: E501 line too long (93 > 79 characters)
Line 100:14: E111 indentation is not a multiple of four
Line 101:14: E111 indentation is not a multiple of four
Line 101:39: W291 trailing whitespace
Line 102:10: E111 indentation is not a multiple of four
Line 102:37: W291 trailing whitespace
Line 103:14: E111 indentation is not a multiple of four
Line 104:14: E111 indentation is not a multiple of four
Line 105:10: E111 indentation is not a multiple of four
Line 106:80: E501 line too long (100 > 79 characters)
Line 107:10: E111 indentation is not a multiple of four
Line 107:15: W291 trailing whitespace
Line 114:4: E111 indentation is not a multiple of four
Line 116:4: E111 indentation is not a multiple of four
Line 117:7: E111 indentation is not a multiple of four
Line 118:7: E111 indentation is not a multiple of four
Line 119:4: E111 indentation is not a multiple of four
Line 120:4: E111 indentation is not a multiple of four
Line 121:7: E111 indentation is not a multiple of four
Line 122:7: E111 indentation is not a multiple of four
Line 123:4: E111 indentation is not a multiple of four
Line 124:4: E111 indentation is not a multiple of four
Line 125:4: E111 indentation is not a multiple of four
Line 126:7: E111 indentation is not a multiple of four
Line 127:7: E111 indentation is not a multiple of four
Line 128:4: E111 indentation is not a multiple of four
Line 129:4: E111 indentation is not a multiple of four
Line 130:10: E111 indentation is not a multiple of four
Line 130:10: E117 over-indented
Line 130:14: W291 trailing whitespace
Line 131:14: E111 indentation is not a multiple of four
Line 131:72: E231 missing whitespace after ','
Line 131:80: E501 line too long (94 > 79 characters)
Line 132:14: E111 indentation is not a multiple of four
Line 133:14: E111 indentation is not a multiple of four
Line 133:39: W291 trailing whitespace
Line 134:10: E111 indentation is not a multiple of four
Line 134:37: W291 trailing whitespace
Line 135:14: E111 indentation is not a multiple of four
Line 136:14: E111 indentation is not a multiple of four
Line 137:10: E111 indentation is not a multiple of four
Line 138:80: E501 line too long (100 > 79 characters)
Line 139:10: E111 indentation is not a multiple of four
Line 139:15: W291 trailing whitespace

Line 62:80: E501 line too long (87 > 79 characters)

Line 26:80: E501 line too long (95 > 79 characters)
Line 30:80: E501 line too long (92 > 79 characters)
Line 34:80: E501 line too long (92 > 79 characters)
Line 42:80: E501 line too long (85 > 79 characters)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants