Skip to content

Sourcery refactored master branch#1

Open
sourcery-ai[bot] wants to merge 1 commit intomasterfrom
sourcery/master
Open

Sourcery refactored master branch#1
sourcery-ai[bot] wants to merge 1 commit intomasterfrom
sourcery/master

Conversation

@sourcery-ai
Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot commented May 22, 2022

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^

Help us improve this pull request!

@sourcery-ai sourcery-ai Bot requested a review from jjbiggins May 22, 2022 09:58
Copy link
Copy Markdown
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 thread 2048/2048.py
Comment on lines -239 to +243
elif not any(0 in row for row in self.matrix) and not self.horizontal_move_exists()\
and not self.vertical_move_exists():
elif (
all(0 not in row for row in self.matrix)
and not self.horizontal_move_exists()
and not self.vertical_move_exists()
):
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Function Game.game_over refactored with the following changes:

Comment on lines -8 to +117
while True:
if(a > b):
(print("error, min can't be more than max. "))
a = int(input("Min: "))
b = int(input("Max: "))
else:
break;
while a > b:
(print("error, min can't be more than max. "))
a = int(input("Min: "))
b = int(input("Max: "))
breaking = "------------"
print("now type in the number: ")
c = int(input(" "))
tries = 1;
d = random.randint(a, b)
while True:
if(d == c and tries == 1):
print("guess 1: " + str(d))
print("HA, gotcha. I got it in 1 time!")
print("Wanna go again? y for yes and anykey for no. ")
i = input("");
if(i == "y"):
print(breaking * 10);
a = int(input("Min: "))
b = int(input("Max: "))
if (d == c and tries == 1):
print(f"guess 1: {str(d)}")
print("HA, gotcha. I got it in 1 time!")
print("Wanna go again? y for yes and anykey for no. ")
i = input("");
if i != "y":
break;
print(breaking * 10);
a = int(input("Min: "))
b = int(input("Max: "))

print("now type in the number")
c = int(input(" "))
tries = 1;
if(a > b):
print("error, min can't be more than max. ")
a = int(input("Min: "))
b = int(input("Max: "))
print("now type in the number")
c = int(input(" "))
else:
d = random.randint(a, b)

else:
break;
elif(d == c):
print("HA, gotcha. I got it in " + str(tries - 1) + " times!")
print("Wanna go again? y for yes and anykey for no. ")
i = input("");
if(i == "y"):
print(breaking * 10);
a = int(input("Min: "))
b = int(input("Max: "))
print("now type in the number")
c = int(input(" "))
tries = 1;
if(a > b):
print("error, min can't be more than max. ")
a = int(input("Min: "))
b = int(input("Max: "))
print("now type in the number")
c = int(input(" "))
else:
d = random.randint(a, b)

print("now type in the number")
c = int(input(" "))
tries = 1;
if(a > b):
print("error, min can't be more than max. ")
a = int(input("Min: "))
b = int(input("Max: "))
print("now type in the number")
c = int(input(" "))
else:
d = random.randint(a, b)

else:
break;

elif(c > b):
print("error, number can't be bigger than max.");
print("Wanna go again? y for yes and anykey for no. ")
i = input("");
if(i == "y"):
print(breaking * 10);
a = int(input("Min: "))
b = int(input("Max: "))
elif d == c:
print(f"HA, gotcha. I got it in {str(tries - 1)} times!")
print("Wanna go again? y for yes and anykey for no. ")
i = input("");
if i != "y":
break;

print("now type in the number")
c = int(input(" "))
tries = 1;
if(a > b):
(print("error, min can't be more than max. "))
a = int(input("Min: "))
b = int(input("Max: "))
print("now type in the number")
c = int(input(" "))
else:
d = random.randint(a, b)
print(breaking * 10);
a = int(input("Min: "))
b = int(input("Max: "))

else:
break;
elif(c < a):
print("error, number can't be smaller than min.");
print("Wanna go again? y for yes and anykey for no. ")
i = input("");
if(i == "y"):
print(breaking * 10);
print("now type in the number")
c = int(input(" "))
tries = 1;
if(a > b):
print("error, min can't be more than max. ")
a = int(input("Min: "))
b = int(input("Max: "))

print("now type in the number")
c = int(input(" "))
tries = 1;
if(a > b):
print("error, min can't be more than max. ")
a = int(input("Min: "))
b = int(input("Max: "))
print("now type in the number")
c = int(input(" "))
else:
d = random.randint(a, b)
else:
break;
elif(d < c):
a = d + 1;
d = random.randint(a, b)
print( "guess " + str(tries) + " :" + str(d));
tries += 1;
else:
d = random.randint(a, b)

elif c > b:
print("error, number can't be bigger than max.");
print("Wanna go again? y for yes and anykey for no. ")
i = input("");
if i != "y":
break;
print(breaking * 10);
a = int(input("Min: "))
b = int(input("Max: "))

print("now type in the number")
c = int(input(" "))
tries = 1;
if(a > b):
(print("error, min can't be more than max. "))
a = int(input("Min: "))
b = int(input("Max: "))
print("now type in the number")
c = int(input(" "))
else:
d = random.randint(a, b)

elif c < a:
print("error, number can't be smaller than min.");
print("Wanna go again? y for yes and anykey for no. ")
i = input("");
if i != "y":
break;
print(breaking * 10);
a = int(input("Min: "))
b = int(input("Max: "))

print("now type in the number")
c = int(input(" "))
tries = 1;
if(a > b):
print("error, min can't be more than max. ")
a = int(input("Min: "))
b = int(input("Max: "))
print("now type in the number")
c = int(input(" "))
else:
d = random.randint(a, b)
elif d < c:
a = d + 1;
d = random.randint(a, b)
print(f"guess {str(tries)} :{str(d)}");
tries += 1;

elif(d > c):
b = d - 1;
d = random.randint(a, b)
print( "guess " + str(tries) + " :" + str(d))
tries += 1
elif d > c:
b = d - 1;
d = random.randint(a, b)
print(f"guess {str(tries)} :{str(d)}")
tries += 1
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Lines 8-124 refactored with the following changes:

def main(x):
X = solver(x)
print("X = " + str(X))
print(f"X = {str(X)}")
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Function main refactored with the following changes:


def monitor():
while (True):
while True:
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Function monitor refactored with the following changes:

Comment thread CSV-to-Excel/main.py
Comment on lines -26 to +29
#rows and columns
row = 1
column = 1

#for each line in the file
for line in file:
for row, line in enumerate(file, start=1):
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Lines 26-46 refactored with the following changes:

This removes the following comments ( why? ):

#rows and columns

Comment on lines -56 to +59
api_link = "https://min-api.cryptocompare.com/data/pricemulti?fsyms={}&tsyms={}".format(cur1, cur2)
api_link = f"https://min-api.cryptocompare.com/data/pricemulti?fsyms={cur1}&tsyms={cur2}"

resp = requests.get(api_link)
# print(r.status_code)
data = json.loads(resp.content)
# print(data)
var = data[self.cur1][self.cur2]
return var
return data[self.cur1][self.cur2]
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Function MainWindow.api refactored with the following changes:

This removes the following comments ( why? ):

# print(data)

self.result = round(self.result, 2)
self.label_2.setText(str(self.result))
self.result = round(self.result, 2)
self.label_2.setText(str(self.result))
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Function MainWindow.convert_fun refactored with the following changes:

def get_temperature(json_data):
temp_in_celcius = json_data['main']['temp']
return temp_in_celcius
return json_data['main']['temp']
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Function get_temperature refactored with the following changes:

Comment on lines -9 to +8
weather_type = json_data['weather'][0]['description']
return weather_type
return json_data['weather'][0]['description']
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Function get_weather_type refactored with the following changes:

Comment on lines -13 to +11
wind_speed = json_data['wind']['speed']
return wind_speed
return json_data['wind']['speed']
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Function get_wind_speed refactored with the following changes:

return (
weather_details
+ f"The weather in {city} is currently {weather_type} with a temperature of {temperature} degrees and wind speeds reaching {wind_speed} km/ph"
)
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Function get_weather_data refactored with the following changes:

Comment thread DOH-Dig/doh-dig
import requests
headers = {'accept': 'application/dns-json'}
url = "https://1.1.1.1/dns-query?name=%s&type=%s" % (record,type)
url = f"https://1.1.1.1/dns-query?name={record}&type={type}"
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Function CloudFlareLookup refactored with the following changes:


if not name.endswith('.pdf'):
name = name + '.pdf'
name = f'{name}.pdf'
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Function main refactored with the following changes:

Comment thread English_Theasauras/app.py
Comment on lines -13 to +16
choice = input("Did you mean %s instead ? Enter Y for yes or N for no: " % get_close_matches(word, data.keys())[0])
choice = input(
f"Did you mean {get_close_matches(word, data.keys())[0]} instead ? Enter Y for yes or N for no: "
)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Function show_def refactored with the following changes:

row_data = []
for cell in row:
row_data.append(cell.value)
row_data = [cell.value for cell in row]
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Function reader refactored with the following changes:

Comment thread File_Carving/carving.py
Comment on lines -22 to +31
print("[>] Directory: %s" % dir_path)
print(f"[>] Directory: {dir_path}")
for files in os.listdir(dir_path):
if os.path.isfile(dir_path+files):
filelist.append(dir_path+files)
for _ in range(cnt):
print("\t", end=" ")
print("[+] File Name: %s" % files)
print(f"[+] File Name: {files}")
file_cnt+=1
elif os.path.isdir(dir_path+files):
for i in range(cnt):
for _ in range(cnt):
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Function fileSearch refactored with the following changes:

Comment thread File_Carving/carving.py
Comment on lines -50 to +54
carv = open('carv'+str(cnt)+'.jpeg', 'wb')
carv = open(f'carv{str(cnt)}.jpeg', 'wb')
for j in range(len(carv_cont)):
carv.write(carv_cont[j])
print('[*] carv',str(cnt),'.jpeg is created!')
carv_list.append('carv'+str(cnt)+'.jpeg')
print('[*] carv', cnt, '.jpeg is created!')
carv_list.append(f'carv{str(cnt)}.jpeg')
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Function Carving refactored with the following changes:

Comment thread File_Carving/carving.py
Comment on lines -66 to +79
while(1):
while 1:
buf = file.read(0x200)
file.tell()
if(len(buf)==0): break
if(flag != 1):
if (flag != 1):
ishead = (str(buf[:3]).split('\'')[1])
if (header == ishead) and (flag == 0):
contents.append(buf)
flag = 1
elif (footer in (str(buf[-2:]).split('\'')[1])):
contents.append(buf)
return contents
else:
if(footer in (str(buf[-2:]).split('\'')[1])):
contents.append(buf)
return contents
else:
contents.append(buf)
contents.append(buf)
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Function findSignature refactored with the following changes:

if len(string) != 12:
return False
for i in range(0, 3):
for i in range(3):
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Function check_phone_number refactored with the following changes:

Comment on lines -21 to +22
print('Phone number has been found! : ' + split) No newline at end of file
print(f'Phone number has been found! : {split}') No newline at end of file
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Lines 24-24 refactored with the following changes:

Comment on lines -13 to +24
while(True):

while True:
choice = random.choice(list(state_capitals.keys()))
answer = input(('{}? '.format(choice)))
answer = input(f'{choice}? ')
if answer == state_capitals[choice]:
print("Correct! Nice job.")
elif answer.lower() == "exit":
print("Goodbye")
break
else:
print("Incorrect. The correct answer is {}".format(state_capitals[choice])) No newline at end of file
print(f"Incorrect. The correct answer is {state_capitals[choice]}") No newline at end of file
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Lines 14-24 refactored with the following changes:

Comment on lines -38 to +44
command1 = 'ren ' + fname + ' "Control Panel.{21EC2020-3AEA-1069-A2DD-' + key + '}"'
command1 = (
f'ren {fname}' + ' "Control Panel.{21EC2020-3AEA-1069-A2DD-' + key + '}"')
command2 = 'attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-' + key + '}"'

dct = read_json()

if not fname in dct.keys():
if fname not in dct.keys():
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Function lock refactored with the following changes:

Comment on lines -80 to +83
status = 'unlocked'
return 'unlocked'
else:
status = 'failed'

return status No newline at end of file
return 'failed' No newline at end of file
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Function unlock refactored with the following changes:

if type( extensions) is not list:
raise Exception('Expected a list object.')
extensions = set( extensions)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Function folder_manager refactored with the following changes:

Comment thread FramedText/FramedText.py
Comment on lines -6 to +28
y = 0
while y < height:
dat[y] = " "+dat[y]+" "
y += 1
width = len(max(dat, key=len))+1
counter = 0
for y in range(height):
dat[y] = f" {dat[y]} "
x = 0
line = "╔"
width = len(max(dat, key=len))+1
while x < width-1:
line = line + "═"
line = f"{line}═"
x += 1
line = line + "╗"
line = f"{line}╗"
print(line)
while counter < height:
for counter in range(height):
reqspaces = width -1- len(dat[counter])
xsp = ""
while reqspaces > 0:
xsp = xsp + " "
xsp = f"{xsp} "
reqspaces -= 1
print(borderstyle+dat[counter]+xsp+borderstyle)
counter += 1
x = 0
line = "╚"
while x < width-1:
line = line + "═"
line = f"{line}═"
x += 1
line = line + "╝"
line = f"{line}╝"
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Function drawboxtext refactored with the following changes:

Comment on lines -15 to +17
print('Input file is '+ str(args.inputfile))
print('Output file is '+ str(args.outputfile))
print('Image diameter will be '+ str(args.diameter))
print(f'Input file is {str(args.inputfile)}')
print(f'Output file is {str(args.outputfile)}')
print(f'Image diameter will be {str(args.diameter)}')
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Lines 15-17 refactored with the following changes:

Comment on lines 11 to +12
save_path=asksaveasfile()

img.save(save_path+"_compressed.JPG") No newline at end of file
img.save(f"{save_path}_compressed.JPG") No newline at end of file
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Lines 12-12 refactored with the following changes:

important = ImportanceChecker(query)

if (important):
if important := ImportanceChecker(query):
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Function main refactored with the following changes:

Comment thread InstadpShower/dppage.py
Comment on lines -10 to +14
content = requests.get("https://www.instagram.com/"+username).content
content = requests.get(f"https://www.instagram.com/{username}").content
find=re.findall(r"logging_page_id.*show_suggested_profiles",str(content))
user_id=((find[0][16:]).split(","))[0][14:-1] # We get the user id of the username
jsonreq=requests.get("https://i.instagram.com/api/v1/users/"+user_id+"/info/").content # using a link we get the whole info of the person
jsonreq = requests.get(
f"https://i.instagram.com/api/v1/users/{user_id}/info/").content
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Lines 10-13 refactored with the following changes:

This removes the following comments ( why? ):

# using a link we get the whole info of the person

Comment on lines -15 to +27
fd_script_output = open(filename_script_output, 'w') # create file descriptor for script to write its stdout to
script_process = subprocess.Popen( # start new process running script
filename_script,
stdin=subprocess.PIPE, # needed for script_process.communicate() (see below)
stdout=fd_script_output # redirect output
)
with open(filename_script_output, 'w') as fd_script_output:
script_process = subprocess.Popen( # start new process running script
filename_script,
stdin=subprocess.PIPE, # needed for script_process.communicate() (see below)
stdout=fd_script_output # redirect output
)

while True:
with open(filename_own_input, 'r') as f:
if exit_keyword in f.read(): # check if we should exit
script_process.communicate(input=stop_command) # stop subprocess and wait for it to terminate
break
time.sleep(1)

fd_script_output.close()
while True:
with open(filename_own_input, 'r') as f:
if exit_keyword in f.read(): # check if we should exit
script_process.communicate(input=stop_command) # stop subprocess and wait for it to terminate
break
time.sleep(1)
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Lines 15-29 refactored with the following changes:

This removes the following comments ( why? ):

# create file descriptor for script to write its stdout to

@sourcery-ai
Copy link
Copy Markdown
Author

sourcery-ai Bot commented May 22, 2022

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 0.19%.

Quality metrics Before After Change
Complexity 11.07 🙂 10.37 🙂 -0.70 👍
Method Length 54.43 ⭐ 53.63 ⭐ -0.80 👍
Working memory 8.28 🙂 8.31 🙂 0.03 👎
Quality 65.60% 🙂 65.79% 🙂 0.19% 👍
Other metrics Before After Change
Lines 6395 6214 -181
Changed files Quality Before Quality After Quality Change
2048/2048.py 76.50% ⭐ 76.51% ⭐ 0.01% 👍
AI_for_Guess_the_number/AI_for_Guess_the_number.py 16.41% ⛔ 19.25% ⛔ 2.84% 👍
Algebra-Solver/Algebra-Solver.py 95.78% ⭐ 95.73% ⭐ -0.05% 👎
Battery_notification/Battery_notification.py 71.68% 🙂 72.90% 🙂 1.22% 👍
CSV-to-Excel/main.py 65.35% 🙂 63.29% 🙂 -2.06% 👎
Checksum/checksum.py 63.33% 🙂 63.47% 🙂 0.14% 👍
Codechef-Code-Submitter/automated-submission.py 73.55% 🙂 73.41% 🙂 -0.14% 👎
Color_to_BW_Converter/bw_convert.py 83.93% ⭐ 83.93% ⭐ 0.00%
Contact-Distribution/contact-distribution.py 59.37% 🙂 62.58% 🙂 3.21% 👍
Crypt_Socket/cryptSocket_cliente.py 71.25% 🙂 71.08% 🙂 -0.17% 👎
Crypt_Socket/cryptSocket_servidor.py 64.00% 🙂 64.13% 🙂 0.13% 👍
Cryptocurrency-Prices/cryptocurrency-prices.py 74.94% 🙂 74.83% 🙂 -0.11% 👎
Cryptocurrency-converter/CryptoConverter.py 85.01% ⭐ 85.74% ⭐ 0.73% 👍
Current_City_Weather/Weather.py 90.09% ⭐ 87.70% ⭐ -2.39% 👎
DOH-Dig/doh-dig 71.61% 🙂 70.64% 🙂 -0.97% 👎
Download-page-as-pdf/download-page-as-pdf.py 73.05% 🙂 72.93% 🙂 -0.12% 👎
English_Theasauras/app.py 78.67% ⭐ 78.49% ⭐ -0.18% 👎
Excel_Files_Merger/Combine excel files into 1.py 82.23% ⭐ 83.09% ⭐ 0.86% 👍
Excel_to_ListofList/ExcelToList.py 79.01% ⭐ 78.29% ⭐ -0.72% 👎
File-Explorer-Dialog-Box/select_file_pyqt.py 95.89% ⭐ 96.89% ⭐ 1.00% 👍
File-Organizer/file-organizer.py 70.24% 🙂 73.21% 🙂 2.97% 👍
File-Sharing-Bot/bot.py 78.41% ⭐ 78.31% ⭐ -0.10% 👎
File_Carving/carving.py 68.06% 🙂 68.80% 🙂 0.74% 👍
Find-PhoneNumber-in-String/Find-PhoneNumber-in-String.py 76.82% ⭐ 78.99% ⭐ 2.17% 👍
Flash-card-Challenge/quizzer.py 66.66% 🙂 69.01% 🙂 2.35% 👍
Folder Locker & Hider/locker.py 75.10% ⭐ 75.45% ⭐ 0.35% 👍
Folder_Manager/Folder_Manager.py 45.79% 😞 47.63% 😞 1.84% 👍
FramedText/FramedText.py 65.32% 🙂 67.59% 🙂 2.27% 👍
Github_Bot/main.py 81.64% ⭐ 81.59% ⭐ -0.05% 👎
HTML_Table_to_List/HTMLTableToList.py 80.26% ⭐ 84.62% ⭐ 4.36% 👍
IMDBQuerier/film_content_parser.py 77.84% ⭐ 75.76% ⭐ -2.08% 👎
IMDBQuerier/html_creator.py 93.28% ⭐ 94.58% ⭐ 1.30% 👍
IMDBQuerier/main.py 67.03% 🙂 66.40% 🙂 -0.63% 👎
IMDBQuerier/parser_config.py 82.76% ⭐ 82.51% ⭐ -0.25% 👎
Image-Circulator/image_circulator.py 53.77% 🙂 53.57% 🙂 -0.20% 👎
Image_Compressor/Image_Compressor.py 88.78% ⭐ 88.61% ⭐ -0.17% 👎
ImportanceChecker/ImportanceChecker.py 92.56% ⭐ 91.59% ⭐ -0.97% 👎
InstadpShower/dppage.py 69.98% 🙂 69.83% 🙂 -0.15% 👎
Minecraft_server_in_background/run.py 66.97% 🙂 67.41% 🙂 0.44% 👍
PDF2text/script.py 86.49% ⭐ 86.49% ⭐ 0.00%
PX-to-REM/px_to_rem.py 82.96% ⭐ 87.30% ⭐ 4.34% 👍
Port_Scanner/port_scanner.py 85.04% ⭐ 84.75% ⭐ -0.29% 👎
Pressure_Converter/pressure_converter_script.py 88.83% ⭐ 93.50% ⭐ 4.67% 👍
Proxy-Request/proxy_request.py 80.93% ⭐ 80.88% ⭐ -0.05% 👎
PyRecorder/py_recorder.py 76.59% ⭐ 75.61% ⭐ -0.98% 👎
Py_Cleaner/main.py 44.77% 😞 46.81% 😞 2.04% 👍
RSA_Algorithm/RSA_algorithm.py 27.34% 😞 27.19% 😞 -0.15% 👎
RSA_Communication/RSA.py 70.62% 🙂 71.17% 🙂 0.55% 👍
Random_Email_Generator/Random_email_generator.py 81.09% ⭐ 81.17% ⭐ 0.08% 👍
Random_Names_Generator/Random_Name_Generator.py 83.05% ⭐ 83.05% ⭐ 0.00%
Random_Password_Generator/PasswordGenerator.py 39.71% 😞 44.79% 😞 5.08% 👍
Random_Password_Generator/createPassword.py 91.18% ⭐ 91.18% ⭐ 0.00%
Remove-Duplicate-Files/removeDuplicateFiles.py 60.95% 🙂 63.28% 🙂 2.33% 👍
Rock-Paper-Scissor/Rock-Paper-Scissor.py 73.27% 🙂 74.15% 🙂 0.88% 👍
SSH_Host_Adder/ssh_adder.py 90.56% ⭐ 90.56% ⭐ 0.00%
SimpleWebpageParser/SimpleWebpageParser.py 96.55% ⭐ 97.12% ⭐ 0.57% 👍
Slideshare-Downloader/slideshare_downloader.py 83.09% ⭐ 83.03% ⭐ -0.06% 👎
SmsYourLocation/SmsYourLocation.py 78.08% ⭐ 78.08% ⭐ 0.00%
Squid-Proxy-Installer-for-Ubuntu16/Squid_Proxy.py 76.84% ⭐ 77.91% ⭐ 1.07% 👍
Steg_Tool/steg.py 15.46% ⛔ 16.74% ⛔ 1.28% 👍
Subtitle-downloader/main.py 85.10% ⭐ 86.08% ⭐ 0.98% 👍
Tambola_Ticket_Generator/main.py 87.18% ⭐ 86.19% ⭐ -0.99% 👎
TicTacToe_AI_and_2_players/TicTacToe2players.py 74.28% 🙂 74.14% 🙂 -0.14% 👎
TicTacToe_AI_and_2_players/TicTacToeAI.py 52.83% 🙂 56.39% 🙂 3.56% 👍
TicTacToe_AI_and_2_players/TicTacToeVsAI.py 73.55% 🙂 73.55% 🙂 0.00%
To Do Bot/bot.py 53.28% 🙂 50.67% 🙂 -2.61% 👎
To Do Bot/dbhelper.py 91.20% ⭐ 91.68% ⭐ 0.48% 👍
TranslateCLI/Translate.py 79.50% ⭐ 80.34% ⭐ 0.84% 👍
Tweets_Tool/Tool.py 50.54% 🙂 50.86% 🙂 0.32% 👍
Website-Blocker/website_blocker.py 41.63% 😞 46.03% 😞 4.40% 👍
Website_Url_Detector/detect_urls.py 89.49% ⭐ 89.39% ⭐ -0.10% 👎
Word-generator/gen.py 82.36% ⭐ 82.52% ⭐ 0.16% 👍
Word_Frequency_Counter/count_word_freq.py 81.99% ⭐ 81.92% ⭐ -0.07% 👎
Work_Log_Generator/work_log.py 77.56% ⭐ 77.70% ⭐ 0.14% 👍
asymmetric_cryptography/asymmetric.py 83.39% ⭐ 82.58% ⭐ -0.81% 👎
automated_email/automated_email.py 49.50% 😞 49.97% 😞 0.47% 👍
caeser_cipher/caeser.py 73.82% 🙂 73.81% 🙂 -0.01% 👎
codeforcesChecker/checker.py 55.60% 🙂 55.72% 🙂 0.12% 👍
codeforcesChecker/main.py 58.55% 🙂 56.40% 🙂 -2.15% 👎
csv_to_json/convert.py 65.15% 🙂 65.02% 🙂 -0.13% 👎
elastic-snapshot/elastic-snapshot.py 56.17% 🙂 56.13% 🙂 -0.04% 👎
file-encrypt-decrypt/crypt.py 77.30% ⭐ 77.35% ⭐ 0.05% 👍
git_automation/create.py 90.03% ⭐ 89.94% ⭐ -0.09% 👎
imageWatermarker/main.py 66.84% 🙂 66.67% 🙂 -0.17% 👎
images2pdf/imges2pdf.py 61.28% 🙂 62.66% 🙂 1.38% 👍
imdb_episode_ratings/scraper.py 57.56% 🙂 54.88% 🙂 -2.68% 👎
insta_video_downloader/instavideo.py 52.90% 🙂 58.68% 🙂 5.78% 👍
json-to-yaml/json2yaml.py 60.34% 🙂 61.10% 🙂 0.76% 👍
logpye_log4j_search/logpye.py 66.28% 🙂 67.54% 🙂 1.26% 👍
medium_article_downloader/helpers.py 77.81% ⭐ 76.42% ⭐ -1.39% 👎
medium_article_downloader/medium.py 73.23% 🙂 73.36% 🙂 0.13% 👍
send_sqs_messages_in_parallel/send_to_sqs.py 82.45% ⭐ 88.82% ⭐ 6.37% 👍
send_whatsapp_message/whatsapp-message.py 69.98% 🙂 67.63% 🙂 -2.35% 👎
spotify_downloader/spotify.py 71.84% 🙂 72.19% 🙂 0.35% 👍
sudoku-solver/sudoku_solver/solver.py 70.50% 🙂 71.90% 🙂 1.40% 👍
vigenere_cipher/vigenere.py 63.49% 🙂 63.58% 🙂 0.09% 👍
yts_torrents/linkdowload.py 60.25% 🙂 60.25% 🙂 0.00%
yts_torrents/yts_am_api.py 48.00% 😞 48.75% 😞 0.75% 👍
zabbix_api/dailyAlertMail.py 72.98% 🙂 72.76% 🙂 -0.22% 👎

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
Steg_Tool/steg.py encode 58 ⛔ 384 ⛔ 17 ⛔ 9.95% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
Steg_Tool/steg.py decode 47 ⛔ 277 ⛔ 17 ⛔ 14.48% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
To Do Bot/bot.py handle_updates 39 ⛔ 330 ⛔ 17 ⛔ 14.88% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
Tweets_Tool/Tool.py TweetManager.getTweets 24 😞 348 ⛔ 19 ⛔ 19.75% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
Py_Cleaner/main.py clean_dir 21 😞 238 ⛔ 13 😞 32.12% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!

@sonarqubecloud
Copy link
Copy Markdown

SonarCloud Quality Gate failed.    Quality Gate failed

Bug C 1 Bug
Vulnerability A 0 Vulnerabilities
Security Hotspot E 2 Security Hotspots
Code Smell A 7 Code Smells

No Coverage information No Coverage information
4.0% 4.0% Duplication

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.

0 participants