Skip to content

Commit 85d842e

Browse files
committed
Change only the format but not the function
... to let them pass the Python lint.
1 parent c0ca74d commit 85d842e

16 files changed

Lines changed: 70 additions & 68 deletions

A solution to project euler problem 3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"""
88

99

10-
def solution(n: int) -> int:
10+
# def solution(n: int) -> int:
1111
def solution(n: int = 600851475143) -> int:
1212
"""Returns the largest prime factor of a given number n.
1313
>>> solution(13195)

BlackJack_game/blackjack.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
master
1+
# master
22
# BLACK JACK - CASINO A GAME OF FORTUNE!!!
33
import time
44

55
# BLACK JACK - CASINO
66
# PYTHON CODE BASE
77

88

9-
master
9+
# master
1010
import random
1111

1212
deck = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11] * 4

Decimal_To_Binary.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
patch-2
2+
# patch-255
33
decimal_accuracy = 7
44

55
def dtbconverter(num):
@@ -40,6 +40,7 @@ def dtbconverter(num):
4040

4141

4242
#i think this code have not proper comment and noe this is easy to understand
43+
'''
4344
=======
4445
Program: Decimal to Binary converter.
4546
@@ -62,4 +63,4 @@ def DecimalToBinary(num):
6263

6364
# Calling function
6465
DecimalToBinary(dec_val)
65-
master
66+
# master

JARVIS/JARVIS.py

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
# import modules
1212
from datetime import datetime # datetime module supplies classes for manipulating dates and times
1313
import subprocess # subprocess module allows you to spawn new processes
14-
master
14+
# master
1515
import pyjokes
1616

17-
=======
17+
# =======
1818
from playsound import * #for sound output
19-
master
19+
# master
2020
import speech_recognition as sr # speech_recognition Library for performing speech recognition with support for Google Speech Recognition, etc..
2121

2222
# pip install pyttsx3
@@ -63,7 +63,7 @@ def voice(p):
6363

6464

6565
# Run Application with Voice Command Function
66-
only_jarvis
66+
# only_jarvis
6767
class Jarvis:
6868
def __init__(self, Q):
6969
self.query = Q
@@ -110,9 +110,9 @@ def get_app(self):
110110
print(task)
111111
return
112112

113-
=======
113+
# =======
114114
def get_app(Q):
115-
master
115+
# master
116116
if Q == "time":
117117
print(datetime.now())
118118
x=datetime.now()
@@ -131,7 +131,7 @@ def get_app(Q):
131131
subprocess.call(['cmd.exe'])
132132
elif Q == "browser":
133133
subprocess.call(['C:\Program Files\Internet Explorer\iexplore.exe'])
134-
patch-1
134+
# patch-1
135135
elif Q == "open youtube":
136136
webbrowser.open("https://www.youtube.com/") # open youtube
137137
elif Q == "open google":
@@ -151,27 +151,27 @@ def get_app(Q):
151151
except Exception as e:
152152
print(e)
153153
speak("Sorray i am not send this mail")
154-
=======
155-
master
156-
elif Q=="Take screenshot"
154+
# =======
155+
# master
156+
elif Q=="Take screenshot":
157157
snapshot=ImageGrab.grab()
158-
drive_letter = "C:\\"
159-
folder_name = r'downloaded-files'
160-
folder_time = datetime.datetime.now().strftime("%Y-%m-%d_%I-%M-%S_%p")
161-
extention = '.jpg'
162-
folder_to_save_files = drive_letter + folder_name + folder_time + extention
163-
snapshot.save(folder_to_save_files)
158+
drive_letter = "C:\\"
159+
folder_name = r'downloaded-files'
160+
folder_time = datetime.datetime.now().strftime("%Y-%m-%d_%I-%M-%S_%p")
161+
extention = '.jpg'
162+
folder_to_save_files = drive_letter + folder_name + folder_time + extention
163+
snapshot.save(folder_to_save_files)
164164

165165
elif Q=="Jokes":
166166
print(pyjokes.get_joke())
167167

168-
master
168+
# master
169169
else:
170170
engine.say("Sorry Try Again")
171171
engine.runAndWait()
172172

173-
=======
174-
=======
173+
# =======
174+
# =======
175175

176176
apps = {
177177
"time": datetime.now(),
@@ -183,17 +183,17 @@ def get_app(Q):
183183
"cmd": "cmd.exe",
184184
"browser": "C:\Program Files\Internet Explorer\iexplore.exe"
185185
}
186-
master
186+
# master
187187

188188
for app in apps:
189189
if app == Q.lower():
190190
subprocess.call([apps[app]])
191191
break
192-
master
192+
# master
193193
else:
194194
engine.say("Sorry Try Again")
195195
engine.runAndWait()
196-
master
196+
# master
197197
return
198198
# Call get_app(Query) Func.
199199
Jarvis(Query).get_app

Password Generator/pass_gen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def gen_password(sequence, passlength=8):
1919
password = ''.join((secrets.choice(sequence) for i in range(passlength)))
2020
return password
2121

22-
class Interface():
22+
class Interface():
2323
has_characters={
2424
"lowercase":True,
2525
"uppercase":True,

Print_List_of_Odd_Numbers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
master
1+
# master
22
#Another best method to do this
33

44
n=map(list(int,input().split()))
@@ -9,7 +9,7 @@
99
# CALCULATE NUMBER OF ODD NUMBERS
1010

1111
# CALCULATE NUMBER OF ODD NUMBERS WITHIN A GIVEN LIMIT
12-
master
12+
# master
1313

1414
n = int(input("Enter the limit : ")) # user input
1515

Quick_Sort.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ def quickSort(arr, low, high):
2222
print("Initial array is:", arr)
2323
n = len(arr)
2424
quickSort(arr, 0, n - 1)
25-
patch-1
26-
print("Sorted array is:", arr)
27-
=======
25+
# patch-1
26+
# print("Sorted array is:", arr)
27+
# =======
2828
print("Sorted array is:")
29-
patch-4
30-
for i in range(0,n):
31-
=======
29+
# patch-4
30+
# for i in range(0,n):
31+
# =======
3232
for i in range(0,len(arr)):
33-
master
33+
# master
3434
print(arr[i],end=" ")
3535

3636
#your code is best but now it is easy to understand
37-
master
37+
# master

SimpleCalculator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def divide(a, b):
1414
except ZeroDivisionError:
1515
return "Zero Division Error"
1616

17-
def power(a,b):
17+
def power(a,b):
1818
return a**b
1919

2020
def main():

To print series 1,12,123,1234......py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
master
1+
# master
22
def num(a):
33

44
# initialising starting number
@@ -36,7 +36,7 @@ def num(a):
3636
a = 5
3737

3838
num(a)
39-
=======
39+
# =======
4040
# 1-12-123-1234 Pattern up to n lines
4141

4242
n = int(input("Enter number of rows: "))
@@ -46,4 +46,4 @@ def num(a):
4646
print(j, end="")
4747
print()
4848

49-
master
49+
# master

aj.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ def Repeat(x):
77
if x[i] == x[j] and x[i] not in repeated:
88
repeated.append(x[i])
99
return repeated
10-
ist1 = [10, 20, 30, 20, 20, 30, 40,
10+
list1 = [10, 20, 30, 20, 20, 30, 40,
1111
50, -20, 60, 60, -20, -20]
12-
print (Repeat(list1))
12+
print(Repeat(list1))

0 commit comments

Comments
 (0)