Skip to content

Commit d4fefe3

Browse files
committed
pyflaked everything
1 parent 40fc01e commit d4fefe3

File tree

29 files changed

+151
-92
lines changed

29 files changed

+151
-92
lines changed

1 File handle/File handle text/input,output and error streams.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@
99
) as F:
1010
while True:
1111
ch = F.readlines()
12-
for i in ch: # ch is the whole file,for i in ch gives lines, for j in i gives letters,for j in i.split gives words
12+
for (
13+
i
14+
) in (
15+
ch
16+
): # ch is the whole file,for i in ch gives lines, for j in i gives letters,for j in i.split gives words
1317
print(i, end="")
1418
else:
1519
sys.stderr.write("End of file reached")

Day_of_week.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ def process_date(user_input):
1212

1313

1414
def find_day(date):
15-
born = (
16-
datetime.datetime.strptime(date, "%d %m %Y").weekday()
17-
) # this statement returns an integer corresponding to the day of the week
15+
born = datetime.datetime.strptime(
16+
date, "%d %m %Y"
17+
).weekday() # this statement returns an integer corresponding to the day of the week
1818
return calendar.day_name[
1919
born
2020
] # this statement returns the corresponding day name to the integer generated in the previous statement

Emoji Dictionary/QT_GUI.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ def clear_text():
131131
button = QPushButton(emoji)
132132
button.setFixedSize(40, 40)
133133
button.setFont(QFont("Arial", 20))
134-
button.setStyleSheet("""
134+
button.setStyleSheet(
135+
"""
135136
QPushButton {
136137
background-color: #ffffff;
137138
border: 1px solid #e0e0e0;
@@ -140,7 +141,8 @@ def clear_text():
140141
QPushButton:hover {
141142
background-color: #f0f0f0;
142143
}
143-
""")
144+
"""
145+
)
144146
button.clicked.connect(lambda checked, e=emoji: add_input_emoji(e))
145147
self.emoji_layout.addWidget(button, row_idx, col_idx)
146148
self.emoji_buttons.append(button)

Industrial_developed_hangman/src/hangman/main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ def user_lose(self) -> None:
126126

127127
def user_win(self) -> None:
128128
"""Print text for end of game and exits."""
129-
print_wrong(f"{self._word_string_to_show} YOU WON", self._print_function) # noqa:WPS305
129+
print_wrong(
130+
f"{self._word_string_to_show} YOU WON", self._print_function
131+
) # noqa:WPS305
130132

131133
def game_process(self, user_character: str) -> bool:
132134
# noqa: DAR201

Infix_to_Postfix.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Python program to convert infix expression to postfix
22

3+
34
# Class to convert the expression
45
class Conversion:
56
# Constructor to initialize the class variables

Merge_linked_list.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Python3 program merge two sorted linked
22
# in third linked list using recursive.
33

4+
45
# Node class
56
class Node:
67
def __init__(self, data):

PONG_GAME.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,7 @@ def new_game():
4545

4646

4747
def draw(canvas):
48-
global \
49-
paddle1_pos, \
50-
paddle2_pos, \
51-
ball_pos, \
52-
ball_vel, \
53-
paddle1_vel, \
54-
paddle2_vel, \
55-
BALL_RADIUS
48+
global paddle1_pos, paddle2_pos, ball_pos, ball_vel, paddle1_vel, paddle2_vel, BALL_RADIUS
5649
global score1, score2
5750

5851
canvas.draw_line([WIDTH / 2, 0], [WIDTH / 2, HEIGHT], 1, "White")

Python Programs/Python Program to Reverse a linked list.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Time Complexity : O(n)
33
# Space Complexity : O(1)
44

5+
56
# Node class
67
class Node:
78
# Constructor to initialize the node object

Python_swapping.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Python3 program to swap first
22
# and last element of a list
33

4+
45
# Swap function
56
def swapList(newList):
67
size = len(newList)

QR_code_generator/qrcode.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import pyqrcode
2+
23
# from pyqrcode import QRCode
34
# no need to import same library again and again
45

0 commit comments

Comments
 (0)