Skip to content

Commit

Permalink
fix : autopep8 revert
Browse files Browse the repository at this point in the history
  • Loading branch information
sepandhaghighi committed Apr 9, 2024
1 parent b859577 commit fa9ab6a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 25 deletions.
6 changes: 1 addition & 5 deletions art/art.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,11 +409,7 @@ 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: 3 additions & 6 deletions otherfile/font_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,14 @@ 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: 3 additions & 6 deletions otherfile/font_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,17 +129,14 @@ 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: 3 additions & 8 deletions otherfile/version_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,9 @@
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 fa9ab6a

Please sign in to comment.