Skip to content

Commit a140bad

Browse files
committed
Fix PEP8 error.
1 parent f7a32e9 commit a140bad

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

main.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# gascii.py
2-
#  A graphic and interactive table of printable ASCII characters.
1+
# gascii.py
2+
# A graphic and interactive table of printable ASCII characters.
33
#
44
# Copyright 2020 Timéo Arnouts <tim.arnouts@protonmail.com>
55
#
@@ -28,8 +28,7 @@
2828

2929
ConsoleEffect = NoReturn
3030

31-
ASCII_CHARS = [chr(char)
32-
for char in range(32, 127)]
31+
ASCII_CHARS = [chr(char) for char in range(32, 127)]
3332

3433
TITLE = "ASCII character table"
3534
DESCRIPTION = "The 95 ASCII printable characters."
@@ -80,9 +79,9 @@ def cursor_position(stdscr,
8079
cursor_x -= 2
8180
elif key == curses.KEY_RIGHT:
8281
cursor_x += 2
83-
elif key == 339: # Page ▲ key.
82+
elif key == 339: # Page ▲ key.
8483
cursor_y = pos_y
85-
elif key == 338: # Page ▼ key.
84+
elif key == 338: # Page ▼ key.
8685
cursor_y = pos_y + y_max
8786
elif key == 262: # Begin ◄ key.
8887
cursor_x = pos_x
@@ -115,8 +114,8 @@ def char_indications(stdscr,
115114
"""
116115
char = chr(char_code)
117116

118-
char_line= "Char: %s" % char
119-
char_name = "Name: %s" % unicodedata.name(char)
117+
char_line = "Char: " + char
118+
char_name = "Name: " + unicodedata.name(char)
120119

121120
stdscr.addstr(pos_y + 1, pos_x, TITLE.center(pos_x - 7), curses.A_BOLD)
122121
stdscr.addstr(pos_y + 3, pos_x, DESCRIPTION)
@@ -135,7 +134,7 @@ def char_indications(stdscr,
135134
def mainloop(stdscr) -> ConsoleEffect:
136135
"""curses rendering."""
137136
rows, cols = stdscr.getmaxyx()
138-
137+
139138
char_table_pos_x, char_table_pos_y = (4, 2)
140139
interface_pos = (cols//2, 0)
141140

@@ -144,7 +143,7 @@ def mainloop(stdscr) -> ConsoleEffect:
144143
char_table_pos_y,
145144
30, 10)
146145

147-
for char in cursor_positions:
146+
for char in cursor_positions:
148147
stdscr.clear()
149148
stdscr.box()
150149

0 commit comments

Comments
 (0)