Skip to content

Commit 1176624

Browse files
authored
Merge pull request #842 from python-geeks/fix_flake8
Fix linting issues
2 parents 4f914ee + d805d0a commit 1176624

File tree

23 files changed

+48
-48
lines changed

23 files changed

+48
-48
lines changed

auto_calender/calendarauto.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def parse_time(timestamp):
130130
def format_timedelta(timedelta):
131131
# Takes a timedelta and returns a string
132132
hours = timedelta.total_seconds() / 3600
133-
return("%.2f" % hours)
133+
return ("%.2f" % hours)
134134

135135

136136
if __name__ == '__main__':

auto_completer/auto-complete.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def make_n_grams(text, n):
136136
n_seq = int(input("Enter number of more words to generate: "))
137137

138138
if len(input_text.split()) < 8:
139-
raise("""Please enter an 8 word sentence
139+
raise ("""Please enter an 8 word sentence
140140
to start with or choose from defaults!!!""")
141141

142142
out = " ".join(generate_text_ngram(model, input_text, word_ixs, n_seq)[0])

battery_notification/battery_notification.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
battery = psutil.sensors_battery()
77
percent = battery.percent
88

9-
while(True):
9+
while (True):
1010
battery = psutil.sensors_battery()
1111
cur_per = battery.percent
1212
change = cur_per - percent
1313
diff = abs(change)
1414
''' We calculate the change in the battery
1515
and show notification if battery level increases or decreases'''
16-
if(diff >= threshold):
16+
if (diff >= threshold):
1717
notification.notify(
1818
title="Battery Percentage",
1919
message=str(cur_per) + "% Battery Remaining",

broken_linkfinder/broken_linkfinder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def find_broken_links(domainToSearch, URL, parentURL):
2020
try:
2121
requestObj = requests.get(URL)
2222
searched_links.append(URL)
23-
if(requestObj.status_code == 404):
23+
if (requestObj.status_code == 404):
2424
broken_links.append("BROKEN: link " + URL + " from " + parentURL)
2525
print(broken_links[-1])
2626
else:

cfsol_submitter/headless.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
t = len(problem)
3636
for i in range(t):
37-
if(not problem[i].isdigit()):
37+
if (not problem[i].isdigit()):
3838
break
3939
else:
4040
part1 = part1 + problem[i]

cfsol_submitter/submit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
t = len(problem)
2828
for i in range(t):
29-
if(not problem[i].isdigit()):
29+
if (not problem[i].isdigit()):
3030
break
3131
else:
3232
part1 = part1 + problem[i]

codechef_scraper/codechef.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def main():
114114
info = get_problems(problem_difficulty[category], no_of_problems)
115115
for name, url in info.items():
116116
problem = get_problem_description(url, name)
117-
if(problem is not None):
117+
if (problem is not None):
118118
convert_to_pdf(problem)
119119
else:
120120
pass

connect_strongest_wifi/connect_strongest_wifi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def main():
6666
print(f"\t[{key+1}] {network[0]}, Signal: {network[1]}%")
6767

6868
choice = input("\nPlease enter your choice : \n\t>> ").strip()
69-
if not(choice.isdigit() and 1 <= int(choice) <= len(networks)):
69+
if not (choice.isdigit() and 1 <= int(choice) <= len(networks)):
7070
print("Wrong Choice Entered. Exiting...")
7171
return False
7272

dictionary_gui/dictionary.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313

1414
def getMeaning():
1515
response = dictionary.meaning(word.get())
16-
if(response):
17-
if('Noun' in response):
16+
if (response):
17+
if ('Noun' in response):
1818
meaning = response['Noun'][0]
19-
elif('Verb' in response):
19+
elif ('Verb' in response):
2020
meaning = response['Verb'][0]
21-
elif('Adjective' in response):
21+
elif ('Adjective' in response):
2222
meaning = response['Adjective'][0]
2323
else:
2424
meaning = "Invalid word"

discount_alerter/amazon_price.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def check_price(URL, desired_price):
5959
raise TypeError('Desired Price should be Int or Double decimal')
6060
else:
6161
current_price = (get_price(getenv("URL")))
62-
if(desired_price < current_price):
62+
if (desired_price < current_price):
6363
# TODO: Sends email
6464
pass
6565
if (desired_price >= current_price):

0 commit comments

Comments
 (0)