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

Merged
merged 1 commit into from
Sep 29, 2022
Merged

Conversation

sourcery-ai[bot]
Copy link

@sourcery-ai sourcery-ai bot commented Sep 29, 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!

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.

n = int(n)
n = n
Copy link
Author

Choose a reason for hiding this comment

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

Function solution refactored with the following changes:

print('The area of the triangle is: ' + area)
print(f'The area of the triangle is: {area}')
Copy link
Author

Choose a reason for hiding this comment

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

Lines 17-17 refactored with the following changes:

for char in xnumber[len(xnumber ) -1]:
if int(char) >= int(xbase):
return False
return True
return all(int(char) < int(xbase) for char in xnumber[len(xnumber ) -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 base_check refactored with the following changes:

Comment on lines -8 to +26
if int(xbase) == 2 or int(xbase) == 4 or int(xbase) == 6 or int(xbase) == 8:
if int(xbase) in {2, 4, 6, 8}:

if xnumber == 0:
return arr
else:
quotient = int(xnumber) // int(xbase)
remainder = int(xnumber) % int(xbase)
arr.append(remainder)
dividend = quotient
convert_from_10(dividend, xbase, arr, base)
quotient, remainder = divmod(int(xnumber), int(xbase))
arr.append(remainder)
dividend = quotient
convert_from_10(dividend, xbase, arr, base)
elif int(xbase) == 16:
if int(xnumber) == 0:
return arr
else:
quotient = int(xnumber) // int(xbase)
remainder = int(xnumber) % int(xbase)
if remainder > 9:
if remainder == 10: remainder = 'A'
if remainder == 11: remainder = 'B'
if remainder == 12: remainder = 'C'
if remainder == 13: remainder = 'D'
if remainder == 14: remainder = 'E'
if remainder == 15: remainder = 'F'
arr.append(remainder)
dividend = quotient
convert_from_10(dividend, xbase, arr, ybase)
quotient, remainder = divmod(int(xnumber), int(xbase))
if remainder > 9:
if remainder == 10: remainder = 'A'
if remainder == 11: remainder = 'B'
if remainder == 12: remainder = 'C'
if remainder == 13: remainder = 'D'
if remainder == 14: remainder = 'E'
if remainder == 15: remainder = 'F'
arr.append(remainder)
dividend = quotient
convert_from_10(dividend, xbase, arr, ybase)
Copy link
Author

Choose a reason for hiding this comment

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

Function convert_from_10 refactored with the following changes:

if percent == 100:
charging_message = "Unplug your Charger"
else:
charging_message = "Charging"
charging_message = "Unplug your Charger" if percent == 100 else "Charging"
Copy link
Author

Choose a reason for hiding this comment

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

Lines 15-18 refactored with the following changes:

@@ -6,6 +6,7 @@
Credit to William J. Turkel and Adam Crymble for the word
frequency code used below. I just merged the two ideas.
"""

Copy link
Author

Choose a reason for hiding this comment

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

Lines 311-314 refactored with the following changes:

return "Company : " + comp
return f"Company : {comp}"
Copy link
Author

Choose a reason for hiding this comment

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

Function CreditCard.company refactored with the following changes:

Comment on lines -38 to +42
if 13 <= len(self.card_no) <= 19:
message = "First check : Valid in terms of length."

else:
message = "First check : Check Card number once again it must be of 13 or 16 digits long."
return message
return (
"First check : Valid in terms of length."
if 13 <= len(self.card_no) <= 19
else "First check : Check Card number once again it must be of 13 or 16 digits long."
)
Copy link
Author

Choose a reason for hiding this comment

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

Function CreditCard.first_check refactored with the following changes:

Comment on lines -54 to +53
sum_ += sum([eval(i) for i in str(double_it)])
sum_ += sum(eval(i) for i in str(double_it))
Copy link
Author

Choose a reason for hiding this comment

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

Function CreditCard.validate refactored with the following changes:

Comment on lines -71 to +65
return "#CHECKSUM# : " + self.card_no[-1]
return f"#CHECKSUM# : {self.card_no[-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 CreditCard.checksum refactored with the following changes:

Comment on lines -17 to +29
score = []
results = []

for div_tags in soup.find_all("div", attrs={"class": "cb-lv-scrs-col text-black"}):
score.append(div_tags.text)
for result in soup.find_all("div", attrs={"class": "cb-lv-scrs-col cb-text-complete"}):
results.append(result.text)
score = [
div_tags.text
for div_tags in soup.find_all(
"div", attrs={"class": "cb-lv-scrs-col text-black"}
)
]

results = [
result.text
for result in soup.find_all(
"div", attrs={"class": "cb-lv-scrs-col cb-text-complete"}
)
]
Copy link
Author

Choose a reason for hiding this comment

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

Lines 17-23 refactored with the following changes:

print("Day on " + user_input + " is " + find_day(date))
print(f"Day on {user_input} is {find_day(date)}")
Copy link
Author

Choose a reason for hiding this comment

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

Lines 28-28 refactored with the following changes:

Comment on lines -24 to +30
w_num = w_num // 2
w_num //= 2
whole.reverse()

i = 0
while i < len(whole):
print(whole[i], end="")
i += 1
i = 0
while i < len(fractional):
print(fractional[i], end="")
i += 1
for item_ in whole:
print(item_, end="")
for item in fractional:
print(item, end="")
Copy link
Author

Choose a reason for hiding this comment

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

Function dtbconverter refactored with the following changes:

Comment on lines -25 to +27
else:
if temp.data == key:
self.head = temp.next
temp = None
if temp.data == key:
self.head = temp.next
temp = 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 Linked_List.Delete refactored with the following changes:

while ptr2.next != Loop_node and ptr2.next != ptr1:
while ptr2.next not in [ptr2, ptr1]:
Copy link
Author

Choose a reason for hiding this comment

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

Function Linked_List.Remove_loop refactored with the following changes:

Comment on lines -88 to +91
File = open("Management.txt", "r")
string = File.read()
string = string.replace("'", '"')
dictionary = json.loads(string)
File.close()

with open("Management.txt", "r") as File:
string = File.read()
string = string.replace("'", '"')
dictionary = json.loads(string)
Copy link
Author

Choose a reason for hiding this comment

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

Function add refactored with the following changes:

Comment on lines -132 to +138
File = open("Management.txt", "a", encoding="utf-8")
temp1 = {
"First_Name": [],
"Last_Name": [],
"Phone_num": [],
"Room_Type": [],
"Days": [],
"Price": [],
"Room": [],
}
File.write(str(temp1))
File.close()
with open("Management.txt", "a", encoding="utf-8") as File:
temp1 = {
"First_Name": [],
"Last_Name": [],
"Phone_num": [],
"Room_Type": [],
"Days": [],
"Price": [],
"Room": [],
}
File.write(str(temp1))
Copy link
Author

Choose a reason for hiding this comment

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

Lines 132-143 refactored with the following changes:

Comment on lines -148 to -162
File = open("Management.txt", "r")
string = File.read()
string = string.replace("'", '"')
dictionary = json.loads(string)
File.close()

with open("Management.txt", "r") as File:
string = File.read()
string = string.replace("'", '"')
dictionary = json.loads(string)
dict_num = dictionary.get("Room")
dict_len = len(dict_num)
print("")
if dict_len == 0:
print("")
print("There is no data in our database")
print("")
menu()
else:
print("")
Copy link
Author

Choose a reason for hiding this comment

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

Function modify refactored with the following changes:

Comment on lines -214 to -228
File = open("Management.txt", "r")
string = File.read()
string = string.replace("'", '"')
dictionary = json.loads(string)
File.close()

with open("Management.txt", "r") as File:
string = File.read()
string = string.replace("'", '"')
dictionary = json.loads(string)
dict_num = dictionary.get("Room")
dict_len = len(dict_num)
print("")
if dict_len == 0:
print("")
print("There is no data in our database")
print("")
menu()
else:
print("")
Copy link
Author

Choose a reason for hiding this comment

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

Function search refactored with the following changes:

Comment on lines -256 to -270
File = open("Management.txt", "r")
string = File.read()
string = string.replace("'", '"')
dictionary = json.loads(string)
File.close()

with open("Management.txt", "r") as File:
string = File.read()
string = string.replace("'", '"')
dictionary = json.loads(string)
dict_num = dictionary.get("Room")
dict_len = len(dict_num)
print("")
if dict_len == 0:
print("")
print("There is no data in our database")
print("")
menu()
else:
print("")
Copy link
Author

Choose a reason for hiding this comment

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

Function remove refactored with the following changes:

Comment on lines -325 to +312
File = open("Management.txt", "r")
string = File.read()
string = string.replace("'", '"')
dictionary = json.loads(string)
File.close()

with open("Management.txt", "r") as File:
string = File.read()
string = string.replace("'", '"')
dictionary = json.loads(string)
Copy link
Author

Choose a reason for hiding this comment

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

Function view refactored with the following changes:

return True if self.top == -1 else False
return self.top == -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 Conversion.isEmpty refactored with the following changes:

Comment on lines -26 to +29
if not self.isEmpty():
self.top -= 1
return self.array.pop()
else:
if self.isEmpty():
return "$"
self.top -= 1
return self.array.pop()
Copy link
Author

Choose a reason for hiding this comment

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

Function Conversion.pop refactored with the following changes:

Comment on lines -48 to +47
return True if a <= b else False
return a <= b
Copy link
Author

Choose a reason for hiding this comment

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

Function Conversion.notGreater refactored with the following changes:

if self.job in self.jobs:
self.jobindex = self.jobs.index(self.job)
else:
self.jobindex = 0
self.jobindex = self.jobs.index(self.job) if self.job in self.jobs else 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 Scheduling.feasible refactored with the following changes:

Comment on lines -67 to +75
print("{} Folder Created".format(name))
print(f"{name} Folder Created")
except WindowsError:
print("{} Folder Exist".format(name))
print(f"{name} Folder Exist")

src = "{}\\{}".format(destLocation, dirs)
dest = "{}\{}".format(destLocation, name)
src = f"{destLocation}\\{dirs}"
dest = f"{destLocation}\{name}"

os.chdir(dest)
shutil.move(src, "{}\\{}".format(dest, dirs))
shutil.move(src, f"{dest}\\{dirs}")
Copy link
Author

Choose a reason for hiding this comment

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

Function Organize refactored with the following changes:

Comment on lines -91 to +104
if 1:
for name, extensions_list in zip(
TYPES_LIST,
[
EXT_VIDEO_LIST,
EXT_IMAGE_LIST,
EXT_DOCUMENT_LIST,
EXT_MUSIC_LIST,
EXT_CODE_LIST,
EXT_EXECUTABLE_LIST,
EXT_COMPRESSED_LIST,
],
):
if dirs.split(".")[-1].upper() in extensions_list:
Organize(dirs, name)
else:
if dirs not in TYPES_LIST:
Organize(dirs, "Folders")

for name, extensions_list in zip(
TYPES_LIST,
[
EXT_VIDEO_LIST,
EXT_IMAGE_LIST,
EXT_DOCUMENT_LIST,
EXT_MUSIC_LIST,
EXT_CODE_LIST,
EXT_EXECUTABLE_LIST,
EXT_COMPRESSED_LIST,
],
):
if dirs.split(".")[-1].upper() in extensions_list:
Organize(dirs, name)
Copy link
Author

Choose a reason for hiding this comment

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

Lines 91-109 refactored with the following changes:

Comment on lines -102 to -112
else:
pass

if (
ball_pos[1] <= (paddle2_pos + HEIGHT / 2 - PAD_HEIGHT / 2)
or ball_pos[1] >= (paddle2_pos + PAD_HEIGHT / 2 + HEIGHT / 2)
) and ball_pos[0] == (WIDTH - PAD_WIDTH - BALL_RADIUS):
score1 += 1
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 draw refactored with the following changes:

Comment on lines -132 to +128
if key == simplegui.KEY_MAP["down"] or key == simplegui.KEY_MAP["up"]:
if key in [simplegui.KEY_MAP["down"], simplegui.KEY_MAP["up"]]:
paddle1_vel = 0
if key == simplegui.KEY_MAP["w"] or key == simplegui.KEY_MAP["s"]:
if key in [simplegui.KEY_MAP["w"], simplegui.KEY_MAP["s"]]:
Copy link
Author

Choose a reason for hiding this comment

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

Function keyup refactored with the following changes:

  • Replace multiple comparisons of same variable with in operator [×2] (merge-comparisons)

for i in range(2, sqrt_n + 1):
if n % i == 0:
return False
return True
return all(n % i != 0 for i in range(2, sqrt_n + 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 is_prime_a refactored with the following changes:

@sourcery-ai
Copy link
Author

sourcery-ai bot commented Sep 29, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 37.00 ⛔ 37.09 ⛔ 0.09 👎
Method Length 69.84 🙂 68.83 🙂 -1.01 👍
Working memory 9.45 🙂 9.45 🙂 0.00
Quality 59.74% 🙂 60.14% 🙂 0.40% 👍
Other metrics Before After Change
Lines 27367 26361 -1006
Changed files Quality Before Quality After Quality Change
A solution to project euler problem 3.py 76.82% ⭐ 77.33% ⭐ 0.51% 👍
AreaOfTriangle.py 86.86% ⭐ 86.70% ⭐ -0.16% 👎
Base Converter Number system.py 43.82% 😞 49.27% 😞 5.45% 👍
Battery_notifier.py 79.18% ⭐ 78.01% ⭐ -1.17% 👎
Binary Coefficients.py 79.99% ⭐ 82.87% ⭐ 2.88% 👍
Binary_search.py 78.91% ⭐ 78.99% ⭐ 0.08% 👍
BruteForce.py 75.35% ⭐ 72.36% 🙂 -2.99% 👎
Caesar Cipher Encoder & Decoder.py 67.00% 🙂 71.64% 🙂 4.64% 👍
Calculate resistance.py 91.44% ⭐ 92.21% ⭐ 0.77% 👍
Classification_human_or_horse.py 56.75% 🙂 56.70% 🙂 -0.05% 👎
Collatz-Conjecture.py 60.16% 🙂 60.49% 🙂 0.33% 👍
Conversation.py 57.88% 🙂 57.80% 🙂 -0.08% 👎
CountMillionCharacter.py 69.45% 🙂 70.38% 🙂 0.93% 👍
Credit_Card_Validator.py 77.02% ⭐ 77.76% ⭐ 0.74% 👍
Cricket_score.py 67.55% 🙂 70.78% 🙂 3.23% 👍
Day_of_week.py 94.15% ⭐ 94.15% ⭐ 0.00%
Decimal_To_Binary.py 72.76% 🙂 76.04% ⭐ 3.28% 👍
Delete_Linked_List.py 86.36% ⭐ 86.92% ⭐ 0.56% 👍
Detect_Remove_loop.py 87.40% ⭐ 88.17% ⭐ 0.77% 👍
EncryptionTool.py 87.41% ⭐ 89.13% ⭐ 1.72% 👍
Factorial.py 89.82% ⭐ 88.89% ⭐ -0.93% 👎
Fibonacci_sequence_recursive_sol.py 93.78% ⭐ 95.41% ⭐ 1.63% 👍
Gregorian_Calendar.py 82.65% ⭐ 89.90% ⭐ 7.25% 👍
GroupSms_Way2.py 51.74% 🙂 51.66% 🙂 -0.08% 👎
Guessing_Game.py 71.08% 🙂 71.48% 🙂 0.40% 👍
Hotel-Management.py 50.38% 🙂 50.73% 🙂 0.35% 👍
Infix_to_Postfix.py 76.53% ⭐ 77.43% ⭐ 0.90% 👍
Job_scheduling.py 59.15% 🙂 61.42% 🙂 2.27% 👍
Letter_Counter.py 82.15% ⭐ 82.15% ⭐ 0.00%
List.py 80.28% ⭐ 80.84% ⭐ 0.56% 👍
Luhn_Algorithm.py 51.09% 🙂 52.25% 🙂 1.16% 👍
Memory_game.py 72.77% 🙂 72.98% 🙂 0.21% 👍
MobiusFunction.py 86.30% ⭐ 84.50% ⭐ -1.80% 👎
Number reverse.py 89.24% ⭐ 89.57% ⭐ 0.33% 👍
Organise.py 78.16% ⭐ 82.04% ⭐ 3.88% 👍
PONG_GAME.py 65.43% 🙂 67.29% 🙂 1.86% 👍
Prime_number.py 83.96% ⭐ 84.37% ⭐ 0.41% 👍
Print_List_of_Even_Numbers.py 74.93% 🙂 79.99% ⭐ 5.06% 👍
Print_List_of_Odd_Numbers.py 71.21% 🙂 71.74% 🙂 0.53% 👍
Program of Reverse of any number.py 87.13% ⭐ 87.45% ⭐ 0.32% 👍
Program to reverse Linked List( Recursive solution).py 83.53% ⭐ 84.07% ⭐ 0.54% 👍
QuadraticCalc.py 62.56% 🙂 62.64% 🙂 0.08% 👍
RandomNumberGame.py 44.28% 😞 44.59% 😞 0.31% 👍
SOUNDEX.py 51.09% 🙂 53.59% 🙂 2.50% 👍
Shivaansh.py 96.01% ⭐ 96.17% ⭐ 0.16% 👍
Snake-Water-Gun-Game.py 31.06% 😞 31.86% 😞 0.80% 👍
StringToBinary.py 80.12% ⭐ 81.88% ⭐ 1.76% 👍
Swap numbers.py 91.73% ⭐ 95.04% ⭐ 3.31% 👍
TicTacToe.py 55.02% 🙂 55.15% 🙂 0.13% 👍
Tic_Tac_Toe.py 68.92% 🙂 68.89% 🙂 -0.03% 👎
Timetable_Operations.py 54.17% 🙂 53.97% 🙂 -0.20% 👎
To print series 1,12,123,1234......py 90.29% ⭐ 90.46% ⭐ 0.17% 👍
Tweet Pre-Processing.py 56.92% 🙂 60.31% 🙂 3.39% 👍
Type of angles of a triangle.py 47.44% 😞 57.91% 🙂 10.47% 👍
Type_of_angles_of_triangle.py 47.31% 😞 52.46% 🙂 5.15% 👍
WeatherGUI.py 66.30% 🙂 66.25% 🙂 -0.05% 👎
WikipediaModule.py 69.61% 🙂 69.18% 🙂 -0.43% 👎
addition.py 74.94% 🙂 77.78% ⭐ 2.84% 👍
alexa_news_headlines.py 89.81% ⭐ 90.33% ⭐ 0.52% 👍
area_of_square.py 98.17% ⭐ 98.17% ⭐ 0.00%
backup_automater_services.py 63.64% 🙂 63.77% 🙂 0.13% 👍
balance_parenthesis.py 76.20% ⭐ 81.45% ⭐ 5.25% 👍
batch_file_rename.py 83.80% ⭐ 83.69% ⭐ -0.11% 👎
binary_search_tree.py 64.09% 🙂 65.41% 🙂 1.32% 👍
binod.py 85.34% ⭐ 86.73% ⭐ 1.39% 👍
birthdays.py 80.30% ⭐ 79.99% ⭐ -0.31% 👎
blackJackGUI.py 84.35% ⭐ 84.69% ⭐ 0.34% 👍
blackjack.py 58.61% 🙂 59.72% 🙂 1.11% 👍
bookstore_manangement_system.py 14.54% ⛔ 14.41% ⛔ -0.13% 👎
calc_area.py 39.92% 😞 39.61% 😞 -0.31% 👎
calculator-gui.py 78.72% ⭐ 78.93% ⭐ 0.21% 👍
calculator.py 74.74% 🙂 76.67% ⭐ 1.93% 👍
changemac.py 65.27% 🙂 65.21% 🙂 -0.06% 👎
chaos.py 82.00% ⭐ 83.22% ⭐ 1.22% 👍
check_file.py 73.87% 🙂 73.79% 🙂 -0.08% 👎
check_for_sqlite_files.py 72.77% 🙂 77.19% ⭐ 4.42% 👍
check_internet_con.py 85.56% ⭐ 85.17% ⭐ -0.39% 👎
check_prime.py 83.96% ⭐ 84.37% ⭐ 0.41% 👍
classicIndianCardMatch.py 51.78% 🙂 53.06% 🙂 1.28% 👍
consonant.py 91.65% ⭐ 95.74% ⭐ 4.09% 👍
conversion.py 97.72% ⭐ 98.67% ⭐ 0.95% 👍
convert_time.py 81.32% ⭐ 81.22% ⭐ -0.10% 👎
coronacases.py 77.98% ⭐ 78.60% ⭐ 0.62% 👍
daily_checks.py 90.51% ⭐ 90.49% ⭐ -0.02% 👎
date-timeclient.py 93.58% ⭐ 93.42% ⭐ -0.16% 👎
date-timeserver.py 79.79% ⭐ 79.64% ⭐ -0.15% 👎
days_from_date.py 88.23% ⭐ 88.23% ⭐ 0.00%
diceV2_dynamic.py 85.40% ⭐ 86.31% ⭐ 0.91% 👍
diction.py 78.73% ⭐ 78.73% ⭐ 0.00%
dir_test.py 80.61% ⭐ 80.38% ⭐ -0.23% 👎
divisors_of_a_number.py 70.20% 🙂 70.06% 🙂 -0.14% 👎
encrypter-decrypter-gui.py 69.36% 🙂 69.77% 🙂 0.41% 👍
encryptsys.py 63.19% 🙂 73.12% 🙂 9.93% 👍
env_check.py 81.33% ⭐ 78.46% ⭐ -2.87% 👎
ex20.py 94.55% ⭐ 95.49% ⭐ 0.94% 👍
facebook id hack.py 77.89% ⭐ 77.97% ⭐ 0.08% 👍
facebook-autologin-bot.py 68.34% 🙂 75.37% ⭐ 7.03% 👍
factor.py 94.79% ⭐ 96.50% ⭐ 1.71% 👍
factorial_perm_comp.py 61.11% 🙂 57.69% 🙂 -3.42% 👎
factors.py 82.74% ⭐ 83.06% ⭐ 0.32% 👍
fibonacci.py 85.00% ⭐ 85.25% ⭐ 0.25% 👍
fileinfo.py 46.05% 😞 46.05% 😞 0.00%
find_cube_root.py 83.07% ⭐ 84.51% ⭐ 1.44% 👍
find_prime.py 87.47% ⭐ 86.45% ⭐ -1.02% 👎
finding LCM.py 85.14% ⭐ 86.85% ⭐ 1.71% 👍
folder_size.py 61.70% 🙂 61.47% 🙂 -0.23% 👎
ftp_send_receive.py 94.79% ⭐ 94.68% ⭐ -0.11% 👎
gambler.py 61.21% 🙂 61.08% 🙂 -0.13% 👎
gcd.py 82.06% ⭐ 82.37% ⭐ 0.31% 👍
get_crypto_price.py 71.16% 🙂 75.22% ⭐ 4.06% 👍
get_info_remoute_srv.py 71.13% 🙂 71.13% 🙂 0.00%
get_likes_on_FB.py 54.26% 🙂 57.21% 🙂 2.95% 👍
get_youtube_view.py 65.69% 🙂 65.56% 🙂 -0.13% 👎
google.py 80.20% ⭐ 81.75% ⭐ 1.55% 👍
googlemaps.py 71.27% 🙂 73.47% 🙂 2.20% 👍
googleweb.py 31.79% 😞 36.17% 😞 4.38% 👍
happy_num.py 71.80% 🙂 73.05% 🙂 1.25% 👍
input matrice,product any order!.py 36.68% 😞 40.97% 😞 4.29% 👍
insertion_sort.py 86.88% ⭐ 86.98% ⭐ 0.10% 👍
internet_connection_py3.py 71.42% 🙂 71.42% 🙂 0.00%
invisible_clock.py 46.13% 😞 46.13% 😞 0.00%
jee_result.py 48.81% 😞 48.81% 😞 0.00%
kmp_str_search.py 70.30% 🙂 70.68% 🙂 0.38% 👍
lcm.py 79.30% ⭐ 80.59% ⭐ 1.29% 👍
length.py 97.00% ⭐ 97.00% ⭐ 0.00%
levenshtein_distance.py 57.39% 🙂 66.68% 🙂 9.29% 👍
linear_search.py 79.58% ⭐ 79.58% ⭐ 0.00%
loader.py 88.77% ⭐ 88.77% ⭐ 0.00%
logs.py 73.19% 🙂 73.04% 🙂 -0.15% 👎
magic8ball.py 94.86% ⭐ 94.83% ⭐ -0.03% 👎
mapit.py 74.60% 🙂 74.44% 🙂 -0.16% 👎
meme_maker.py 58.13% 🙂 57.74% 🙂 -0.39% 👎
memorygame.py 84.50% ⭐ 84.50% ⭐ 0.00%
merge.py 83.48% ⭐ 83.48% ⭐ 0.00%
mobilePhoneSpecsScrapper.py 66.80% 🙂 66.48% 🙂 -0.32% 👎
move_files_over_x_days.py 50.55% 🙂 53.52% 🙂 2.97% 👍
new.py 53.11% 🙂 56.63% 🙂 3.52% 👍
new_pattern.py 90.62% ⭐ 90.52% ⭐ -0.10% 👎
new_script.py 32.76% 😞 34.52% 😞 1.76% 👍
news_articles__scraper.py 19.74% ⛔ 19.74% ⛔ 0.00%
next_number.py 56.74% 🙂 58.24% 🙂 1.50% 👍
nmap_scan.py 81.39% ⭐ 81.43% ⭐ 0.04% 👍
nslookup_check.py 97.83% ⭐ 97.67% ⭐ -0.16% 👎
oneeven.py 85.18% ⭐ 88.40% ⭐ 3.22% 👍
passwordGen.py 55.34% 🙂 55.56% 🙂 0.22% 👍
password_checker.py 69.49% 🙂 69.49% 🙂 0.00%
password_cracker.py 83.51% ⭐ 83.83% ⭐ 0.32% 👍
password_manager.py 49.49% 😞 52.57% 🙂 3.08% 👍
ph_email.py 72.99% 🙂 73.04% 🙂 0.05% 👍
ping_servers.py 30.30% 😞 30.25% 😞 -0.05% 👎
ping_subnet.py 38.58% 😞 38.58% 😞 0.00%
portscanner.py 81.58% ⭐ 81.53% ⭐ -0.05% 👎
powerdown_startup.py 76.82% ⭐ 76.41% ⭐ -0.41% 👎
powerup_checks.py 68.31% 🙂 69.06% 🙂 0.75% 👍
prison_break_scrapper.py 76.53% ⭐ 79.41% ⭐ 2.88% 👍
pscheck.py 92.11% ⭐ 92.04% ⭐ -0.07% 👎
psunotify.py 57.90% 🙂 59.32% 🙂 1.42% 👍
puttylogs.py 67.26% 🙂 67.11% 🙂 -0.15% 👎
pyauto.py 78.54% ⭐ 78.54% ⭐ 0.00%
pythonVideoDownloader.py 84.60% ⭐ 85.12% ⭐ 0.52% 👍
python_sms.py 41.61% 😞 41.55% 😞 -0.06% 👎
quote.py 91.32% ⭐ 93.93% ⭐ 2.61% 👍
random-sentences.py 93.74% ⭐ 92.20% ⭐ -1.54% 👎
random_file_move.py 62.64% 🙂 62.36% 🙂 -0.28% 👎
randomloadingmessage.py 33.45% 😞 33.45% 😞 0.00%
rangoli.py 52.29% 🙂 52.47% 🙂 0.18% 👍
recursive-fibonacci.py 86.59% ⭐ 89.06% ⭐ 2.47% 👍
recyclebin.py 90.92% ⭐ 90.65% ⭐ -0.27% 👎
rock_paper_scissor_game.py 79.21% ⭐ 83.75% ⭐ 4.54% 👍
rook.py 16.98% ⛔ 18.89% ⛔ 1.91% 👍
rotate_string.py 90.82% ⭐ 91.53% ⭐ 0.71% 👍
rotatelist.py 81.68% ⭐ 83.77% ⭐ 2.09% 👍
russian_roulette.py 34.04% 😞 38.39% 😞 4.35% 👍
scalg.py 39.77% 😞 38.39% 😞 -1.38% 👎
scrap_file.py 83.68% ⭐ 83.39% ⭐ -0.29% 👎
script_count.py 83.57% ⭐ 83.57% ⭐ 0.00%
sendemail.py 66.93% 🙂 67.83% 🙂 0.90% 👍
sensors_information.py 94.96% ⭐ 94.38% ⭐ -0.58% 👎
serial_scanner.py 55.88% 🙂 57.06% 🙂 1.18% 👍
sha1.py 68.58% 🙂 68.37% 🙂 -0.21% 👎
simulate_memory_cpu.py 81.85% ⭐ 80.98% ⭐ -0.87% 👎
singly_linked_list.py 80.35% ⭐ 80.35% ⭐ 0.00%
snake.py 10.97% ⛔ 11.00% ⛔ 0.03% 👍
soundex_algorithm.py 59.91% 🙂 62.71% 🙂 2.80% 👍
spiralmatrix.py 49.50% 😞 50.55% 🙂 1.05% 👍
spotifyAccount.py 75.34% ⭐ 74.11% 🙂 -1.23% 👎
sqlite_check.py 57.15% 🙂 54.81% 🙂 -2.34% 👎
sqlite_table_check.py 50.55% 🙂 50.73% 🙂 0.18% 👍
stack.py 94.65% ⭐ 95.50% ⭐ 0.85% 👍
stackF_Harsh2255.py 96.43% ⭐ 96.13% ⭐ -0.30% 👎
string_rotation.py 86.27% ⭐ 86.69% ⭐ 0.42% 👍
sudoku.py 71.90% 🙂 71.28% 🙂 -0.62% 👎
swap.py 93.69% ⭐ 97.01% ⭐ 3.32% 👍
text_file_replace.py 78.79% ⭐ 78.54% ⭐ -0.25% 👎
tf_idf_generator.py 38.35% 😞 38.60% 😞 0.25% 👍
thread_signal.py 95.68% ⭐ 95.95% ⭐ 0.27% 👍
tic-tac-toe.py 66.00% 🙂 65.19% 🙂 -0.81% 👎
tic_tak_toe.py 77.72% ⭐ 80.07% ⭐ 2.35% 👍
tik_tak.py 51.81% 🙂 52.60% 🙂 0.79% 👍
time_delta.py 90.83% ⭐ 90.83% ⭐ 0.00%
translation_of_sizes_of_underwear_RU.py 74.79% 🙂 74.38% 🙂 -0.41% 👎
tweeter.py 80.71% ⭐ 79.86% ⭐ -0.85% 👎
vowels.py 93.60% ⭐ 94.71% ⭐ 1.11% 👍
wiki_random.py 62.14% 🙂 62.03% 🙂 -0.11% 👎
work_connect.py 44.95% 😞 46.77% 😞 1.82% 👍
1 File handle/File handle binary/Deleting record in a binary file.py 84.68% ⭐ 86.61% ⭐ 1.93% 👍
1 File handle/File handle binary/Update a binary file.py 76.65% ⭐ 76.60% ⭐ -0.05% 👎
1 File handle/File handle binary/Update a binary file2.py 69.00% 🙂 69.59% 🙂 0.59% 👍
1 File handle/File handle binary/question 1 (elegible for remedial, top marks).py 81.33% ⭐ 82.15% ⭐ 0.82% 👍
1 File handle/File handle binary/search record in binary file.py 81.29% ⭐ 84.34% ⭐ 3.05% 👍
1 File handle/File handle text/input,output and error streams.py 83.20% ⭐ 84.19% ⭐ 0.99% 👍
1 File handle/File handle text/special symbol after word.py 83.95% ⭐ 87.23% ⭐ 3.28% 👍
Assembler/assembler.py 7.22% ⛔ 7.11% ⛔ -0.11% 👎
Automated Scheduled Call Reminders/caller.py 60.96% 🙂 62.54% 🙂 1.58% 👍
BlackJack_game/blackjack.py 47.24% 😞 48.26% 😞 1.02% 👍
BlackJack_game/blackjack_rr.py 67.90% 🙂 67.03% 🙂 -0.87% 👎
BlackJack_game/blackjack_simulate.py 79.93% ⭐ 80.29% ⭐ 0.36% 👍
BoardGame-CLI/snakeLadder.py 52.77% 🙂 52.80% 🙂 0.03% 👍
BoardGame-CLI/uno.py 37.26% 😞 34.09% 😞 -3.17% 👎
CRC/crc.py 57.65% 🙂 57.65% 🙂 0.00%
Cat/cat.py 91.07% ⭐ 92.42% ⭐ 1.35% 👍
Checker_game_by_dz/modules/checker.py 84.48% ⭐ 84.56% ⭐ 0.08% 👍
Checker_game_by_dz/modules/checker_board.py 58.84% 🙂 60.42% 🙂 1.58% 👍
Colors/pixel_sort.py 58.62% 🙂 58.84% 🙂 0.22% 👍
Colors/primary_colors.py 15.77% ⛔ 16.34% ⛔ 0.57% 👍
Compression_Analysis/PSNR.py 83.49% ⭐ 83.33% ⭐ -0.16% 👎
Eight_Puzzle_Solver/eight_puzzle.py 64.18% 🙂 67.10% 🙂 2.92% 👍
Emoji Dictionary/emoji_dictionary.py 83.53% ⭐ 83.50% ⭐ -0.03% 👎
Face_Mask_detection (haarcascade)/mask_detection.py 37.34% 😞 38.38% 😞 1.04% 👍
Flappy Bird - created with tkinter/Background.py 70.99% 🙂 71.80% 🙂 0.81% 👍
Flappy Bird - created with tkinter/Bird.py 67.91% 🙂 68.00% 🙂 0.09% 👍
Flappy Bird - created with tkinter/Flappy Bird.py 75.10% ⭐ 75.60% ⭐ 0.50% 👍
Flappy Bird - created with tkinter/Settings.py 55.57% 🙂 61.58% 🙂 6.01% 👍
Flappy Bird - created with tkinter/Tubes.py 58.16% 🙂 59.56% 🙂 1.40% 👍
Google_Image_Downloader/image_grapper.py 74.09% 🙂 76.37% ⭐ 2.28% 👍
Hand-Motion-Detection/hand_motion_recognizer.py 50.33% 🙂 50.63% 🙂 0.30% 👍
ImageDownloader/img_downloader.py 86.00% ⭐ 86.14% ⭐ 0.14% 👍
JARVIS/JARVIS.py 60.06% 🙂 60.91% 🙂 0.85% 👍
JustDialScrapperGUI/Justdial Scrapper GUI.py 58.27% 🙂 58.77% 🙂 0.50% 👍
Koch Curve/koch curve.py 81.95% ⭐ 83.16% ⭐ 1.21% 👍
PDF/header_footer.py 91.56% ⭐ 91.45% ⭐ -0.11% 👎
PDF/images.py 62.65% 🙂 62.55% 🙂 -0.10% 👎
Password Generator/pass_gen.py 90.41% ⭐ 91.91% ⭐ 1.50% 👍
Patterns/pattern1.py 86.02% ⭐ 87.87% ⭐ 1.85% 👍
Patterns/pattern2.py 86.95% ⭐ 88.71% ⭐ 1.76% 👍
Patterns/patterns.py 72.19% 🙂 75.25% ⭐ 3.06% 👍
PongPong_Game/pong/load.py 74.20% 🙂 77.70% ⭐ 3.50% 👍
QR_code_generator/qrcode.py 87.18% ⭐ 87.02% ⭐ -0.16% 👎
Recursion Visulaizer/recursionVisualizer.py 70.72% 🙂 73.91% 🙂 3.19% 👍
Snake_water_gun/main.py 24.12% ⛔ 24.79% ⛔ 0.67% 👍
Sorting Algorithims/Bubble_sort.py 88.42% ⭐ 89.97% ⭐ 1.55% 👍
Sorting Algorithims/Count sort.py 82.56% ⭐ 82.56% ⭐ 0.00%
Sorting Algorithims/Counting Sort.py 77.48% ⭐ 77.70% ⭐ 0.22% 👍
Sorting Algorithims/Counting-sort.py 83.32% ⭐ 83.41% ⭐ 0.09% 👍
Sorting Algorithims/Cycle Sort.py 61.54% 🙂 61.67% 🙂 0.13% 👍
Sorting Algorithims/Iterative Merge Sort.py 64.54% 🙂 64.81% 🙂 0.27% 👍
Sorting Algorithims/Merge Sort.py 65.36% 🙂 65.50% 🙂 0.14% 👍
Sorting Algorithims/Merge-sort.py 70.07% 🙂 72.70% 🙂 2.63% 👍
Sorting Algorithims/Sort the values of first list using second list.py 92.19% ⭐ 92.11% ⭐ -0.08% 👎
Sorting Algorithims/Tim_sort.py 71.05% 🙂 71.15% 🙂 0.10% 👍
Sorting Algorithims/brickSort.py 73.56% 🙂 73.61% 🙂 0.05% 👍
Sorting Algorithims/bubblesortpgm.py 81.86% ⭐ 82.29% ⭐ 0.43% 👍
Sorting Algorithims/merge_sort.py 74.28% 🙂 77.11% ⭐ 2.83% 👍
Sorting Algorithims/selectionSort.py 69.16% 🙂 69.44% 🙂 0.28% 👍
Sorting Algorithims/sorting.py 72.39% 🙂 74.48% 🙂 2.09% 👍
Sorting Algorithims/stooge_sort.py 76.43% ⭐ 78.40% ⭐ 1.97% 👍
Sorting Algorithims/wave_sort.py 93.53% ⭐ 93.62% ⭐ 0.09% 👍
Test-Case-Generator/test_case.py 73.35% 🙂 73.43% 🙂 0.08% 👍
Triplets with zero sum/find_Triplets_with_zero_sum.py 74.05% 🙂 74.15% 🙂 0.10% 👍
VoiceAssistant/Project_Basic_struct/VoiceAssistant_main.py 23.75% ⛔ 23.75% ⛔ 0.00%
VoiceAssistant/Project_Basic_struct/dictator.py 77.08% ⭐ 77.02% ⭐ -0.06% 👎
VoiceAssistant/Project_Basic_struct/speakListen.py 80.14% ⭐ 80.43% ⭐ 0.29% 👍
VoiceAssistant/Project_Basic_struct/textRead.py 29.54% 😞 29.29% 😞 -0.25% 👎
VoiceAssistant/Project_Basic_struct/websiteWork.py 65.71% 🙂 65.91% 🙂 0.20% 👍
VoiceRepeater/main.py 90.49% ⭐ 90.71% ⭐ 0.22% 👍
Weather Scrapper/weather.py 50.29% 🙂 50.24% 🙂 -0.05% 👎
Windows_Wallpaper_Script/wallpaper_extract.py 70.73% 🙂 71.82% 🙂 1.09% 👍
Wordle/wordle.py 19.79% ⛔ 21.44% ⛔ 1.65% 👍
XORcipher/XOR_cipher.py 84.05% ⭐ 85.22% ⭐ 1.17% 👍
Youtube Downloader With GUI/main.py 65.22% 🙂 65.22% 🙂 0.00%
async_downloader/async_downloader.py 72.66% 🙂 71.56% 🙂 -1.10% 👎
bank_managment_system/backend.py 87.46% ⭐ 88.30% ⭐ 0.84% 👍
bank_managment_system/frontend.py 40.39% 😞 40.32% 😞 -0.07% 👎
brickout-game/brickout-game.py 63.95% 🙂 64.55% 🙂 0.60% 👍
currency converter/main.py 85.35% ⭐ 85.50% ⭐ 0.15% 👍
email id dictionary/dict1.py 84.94% ⭐ 85.25% ⭐ 0.31% 👍
flappyBird_pygame/flappy_bird.py 52.17% 🙂 52.17% 🙂 0.00%
floodfill/floodfill.py 58.12% 🙂 58.65% 🙂 0.53% 👍
game_of_life/game_o_life.py 73.42% 🙂 75.09% ⭐ 1.67% 👍
image2pdf/image2pdf.py 93.24% ⭐ 93.78% ⭐ 0.54% 👍
insta_monitering/insta_api.py 74.28% 🙂 75.38% ⭐ 1.10% 👍
insta_monitering/insta_datafetcher.py 66.50% 🙂 66.92% 🙂 0.42% 👍
insta_monitering/subpinsta.py 76.87% ⭐ 76.75% ⭐ -0.12% 👎
linear-algebra-python/src/lib.py 74.30% 🙂 77.73% ⭐ 3.43% 👍
local_weighted_learning/local_weighted_learning.py 79.16% ⭐ 79.07% ⭐ -0.09% 👎
nasa_apod_with_requests/run.py 50.00% 😞 54.67% 🙂 4.67% 👍
notepad/notepad_support.py 82.25% ⭐ 82.27% ⭐ 0.02% 👍
other_pepole/get_ip_gui 80.72% ⭐ 80.68% ⭐ -0.04% 👎
primelib/primelib.py 70.72% 🙂 71.63% 🙂 0.91% 👍
rearrange-files/rearrange-files.py 78.39% ⭐ 78.18% ⭐ -0.21% 👎
socket-programming/client.py 76.74% ⭐ 76.45% ⭐ -0.29% 👎
socket-programming/server.py 68.91% 🙂 64.34% 🙂 -4.57% 👎
stone_paper_scissor/main.py 68.88% 🙂 68.74% 🙂 -0.14% 👎
stone_paper_scissor/utils.py 86.20% ⭐ 87.97% ⭐ 1.77% 👍
thired-party-haarcascade-mustache-on-face/mustache-add-on-face.py 28.48% 😞 28.58% 😞 0.10% 👍
thired-party-haarcascade-mustache-on-face/utils.py 78.33% ⭐ 78.93% ⭐ 0.60% 👍
ultimate-phone-book/contacts.py 2.79% ⛔ 3.79% ⛔ 1.00% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
Assembler/assembler.py scanner 306 ⛔ 1808 ⛔ 57 ⛔ 0.01% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
Assembler/assembler.py parser 478 ⛔ 1820 ⛔ 29 ⛔ 1.02% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
VoiceAssistant/Project_Basic_struct/textRead.py pdf_read 54 ⛔ 793 ⛔ 21 ⛔ 6.08% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
Colors/primary_colors.py simpleColor 114 ⛔ 414 ⛔ 14 😞 11.01% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
flappyBird_pygame/flappy_bird.py main 34 ⛔ 393 ⛔ 21 ⛔ 12.63% ⛔ 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!

@rahulgurujala rahulgurujala merged commit 55dcc6c into master Sep 29, 2022
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.

1 participant