Skip to content

Commit

Permalink
fix : autopep8
Browse files Browse the repository at this point in the history
  • Loading branch information
sepandhaghighi committed Apr 8, 2024
1 parent da88564 commit 7d17d17
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 10 deletions.
6 changes: 5 additions & 1 deletion art/art.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,11 @@ def indirect_decoration(decoration):
decoration = random.choice(decorations)
return decoration
if decoration not in decorations:
decoration = min(decorations, key=lambda x: distance_calc(decoration, x))
decoration = min(
decorations,
key=lambda x: distance_calc(
decoration,
x))
return decoration


Expand Down
9 changes: 6 additions & 3 deletions otherfile/font_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,17 @@ def print_result(flag_list, message_list):
for font in Font_List:
height_list = []
font_data = ""
first_line_list = [x.split("\n")[0] in ["", " "] for x in art.get_font_dic(font).values()]
last_line_list = [x.split("\n")[-1] in ["", " "] for x in art.get_font_dic(font).values()]
first_line_list = [x.split("\n")[0] in ["", " "]
for x in art.get_font_dic(font).values()]
last_line_list = [x.split("\n")[-1] in ["", " "]
for x in art.get_font_dic(font).values()]
for letter, letter_data in art.get_font_dic(font).items():
letter_data_split = letter_data.split("\n")
width_list = [len(x) for x in letter_data_split]
if letter_data_split[-1] in ["", " "] and all(last_line_list):
width_list = width_list[:-1]
if width_list and letter_data_split[0] in ["", " "] and all(first_line_list):
if width_list and letter_data_split[0] in [
"", " "] and all(first_line_list):
width_list = width_list[1:]
if len(set(width_list)) > 1:
print(
Expand Down
9 changes: 6 additions & 3 deletions otherfile/font_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,17 @@ def is_ascii(s):
if font1_map == font2_map:
print(Error3 + font2)
sys.exit()
first_line_list = [x.split("\n")[0] in ["", " "] for x in font_dic.values()]
last_line_list = [x.split("\n")[-1] in ["", " "] for x in font_dic.values()]
first_line_list = [x.split("\n")[0] in ["", " "]
for x in font_dic.values()]
last_line_list = [x.split("\n")[-1] in ["", " "]
for x in font_dic.values()]
for letter, letter_data in font_dic.items():
letter_data_split = letter_data.split("\n")
width_list = [len(x) for x in letter_data_split]
if letter_data_split[-1] in ["", " "] and all(last_line_list):
width_list = width_list[:-1]
if width_list and letter_data_split[0] in ["", " "] and all(first_line_list):
if width_list and letter_data_split[0] in [
"", " "] and all(first_line_list):
width_list = width_list[1:]
if len(set(width_list)) > 1:
print(Error7.format(letter))
Expand Down
11 changes: 8 additions & 3 deletions otherfile/version_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,14 @@
os.path.join(
"art",
"art_param.py"): PARAMS_ITEMS,
os.path.join("otherfile", "meta.yaml"): META_ITEMS,
os.path.join(".github", "ISSUE_TEMPLATE", "bug_report.yml"): ISSUE_TEMPLATE_ITEMS,
}
os.path.join(
"otherfile",
"meta.yaml"): META_ITEMS,
os.path.join(
".github",
"ISSUE_TEMPLATE",
"bug_report.yml"): ISSUE_TEMPLATE_ITEMS,
}

TEST_NUMBER = len(FILES) + 1

Expand Down

0 comments on commit 7d17d17

Please sign in to comment.