Skip to content

Commit 71367d4

Browse files
committed
Fix formatting
1 parent fa8672f commit 71367d4

5 files changed

Lines changed: 37 additions & 20 deletions

File tree

engine/__main__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,7 @@
77

88
from .logger import Status, logger
99

10-
logger("The engine module cannot be run directly to launch the GUI. You might be trying to run engine.gui.", status=Status.CRITICAL)
10+
logger(
11+
"The engine module cannot be run directly to launch the GUI. You might be trying to run engine.gui.",
12+
status=Status.CRITICAL,
13+
)

engine/build_tools.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,14 @@ def _build_pyinstaller(name: str, directory: Path) -> None:
4848
"--onedir",
4949
"--noconsole",
5050
"--noconfirm",
51-
"--name", name,
52-
"--distpath", str(directory / "dist"),
53-
"--workpath", str(directory / "build"),
54-
"--specpath", str(directory),
51+
"--name",
52+
name,
53+
"--distpath",
54+
str(directory / "dist"),
55+
"--workpath",
56+
str(directory / "build"),
57+
"--specpath",
58+
str(directory),
5559
f"--add-data={directory / 'game.absp'!s}{os.pathsep}.",
5660
]
5761

@@ -101,7 +105,13 @@ def build(name: str, directory: Path, ENGINE_DATA_PATH: str) -> Optional[Process
101105

102106
name = name.replace(" ", "-")
103107

104-
process = Process(target=_build_pyinstaller, args=(name, directory,))
108+
process = Process(
109+
target=_build_pyinstaller,
110+
args=(
111+
name,
112+
directory,
113+
),
114+
)
105115
process.start()
106116

107117
return process

engine/core/__init__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -440,11 +440,7 @@ def __init__(
440440
self.screen: pygame.Surface = pygame.display.set_mode(self.wsize, display_flags)
441441
pygame.display.set_caption(title)
442442

443-
if (
444-
not IS_EDITOR
445-
and sys.stdout is not None
446-
and sys.stdout.isatty()
447-
):
443+
if not IS_EDITOR and sys.stdout is not None and sys.stdout.isatty():
448444
print(colorama.ansi.set_title(title), end="")
449445

450446
self.set_icon(icon_path)

engine/gui/__init__.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,9 @@ def build_game(self) -> None:
208208
progress_content = ttk.Frame(progress_popup, padding=(24, 20))
209209
progress_content.pack(fill="both", expand=True)
210210

211-
ttk.Label(
212-
progress_content, text="Building Game", font=("Segoe UI", 12, "bold")
213-
).pack(anchor="w")
211+
ttk.Label(progress_content, text="Building Game", font=("Segoe UI", 12, "bold")).pack(
212+
anchor="w"
213+
)
214214

215215
ttk.Label(
216216
progress_content,
@@ -230,8 +230,12 @@ def build_game(self) -> None:
230230
).pack(anchor="w", pady=(12, 0))
231231

232232
progress_popup.update_idletasks()
233-
popup_x = self.root.winfo_x() + (self.root.winfo_width() - progress_popup.winfo_width()) // 2
234-
popup_y = self.root.winfo_y() + (self.root.winfo_height() - progress_popup.winfo_height()) // 2
233+
popup_x = (
234+
self.root.winfo_x() + (self.root.winfo_width() - progress_popup.winfo_width()) // 2
235+
)
236+
popup_y = (
237+
self.root.winfo_y() + (self.root.winfo_height() - progress_popup.winfo_height()) // 2
238+
)
235239
progress_popup.geometry(f"+{popup_x}+{popup_y}")
236240

237241
progress_popup.grab_set()

engine/saveload.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,24 @@ def save_project(engine: Any, dir_str: Optional[str] = None) -> Optional[str]:
6868
)
6969

7070
with open(dir / ".gitignore", "w") as f:
71-
f.write("""
71+
f.write(
72+
"""
7273
data/images/abs_* # Remove if using ABS Engine's logo or other ABS assets
7374
engine/
7475
launch_game.py
7576
run.py
7677
build/
7778
dist/
7879
*.spec
79-
""".strip())
80+
""".strip()
81+
)
8082

8183
with open(dir / ".gitattributes", "w") as f:
82-
f.write("""
84+
f.write(
85+
"""
8386
*.absp text linguist-language=JSON linguist-detectable=true diff=json
84-
""".strip())
87+
""".strip()
88+
)
8589

8690
messagebox.showinfo("Success", "Project saved successfully.")
8791

0 commit comments

Comments
 (0)