Skip to content

Commit

Permalink
Typing additions, tear out last remaining gui.console.prints, fix whi…
Browse files Browse the repository at this point in the history
…tespace (Taiko2k#1329)

* Typing additions, tear out last remaining gui.console.prints, fix whitespace

* Typing, variable typo fix, convert more things to pathlib, fix Taiko2k#576, fix opening encode dir without transcoding first

* Add fix to changelog
  • Loading branch information
C0rn3j authored Dec 4, 2024
1 parent 8dd8b13 commit d154656
Show file tree
Hide file tree
Showing 4 changed files with 120 additions and 98 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Changelog
- **Fixed** playlist being able to skip to next song even when current song was looped due to a race condition
- **Fixed** infinite timeouts in requests (except for main module, for now), this should fix random rare freezes of various functionality
- **Fixed** not checking for errors when using subprocess, this allowed various things to fail and continue going on as if nothing happened
- **Fixed** saving files with forbidden characters from one FS to another that is FAT32, they are now replaced by an underscore on failure detection
- **Improved** missing assets or locales now throw an error instead of silently (or not so silently) failing
- **Improved** creating SDL window and renderer, making Tauon crash immediately on a fatal failure rather on nonsense errors later on
- **Improved** build system
Expand Down
4 changes: 2 additions & 2 deletions src/tauon/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def __init__(self):
super().__init__()
self.log_history = [] # List to store log messages

def emit(self, record):
def emit(self, record: dict):
self.log_history.append(record) # Append to the log history
if len(self.log_history) > 50:
del self.log_history[0]
Expand Down Expand Up @@ -465,7 +465,7 @@ def transfer_args_and_exit() -> None:
holder.t_agent = t_agent
holder.dev_mode = dev_mode
holder.instance_lock = fp
holder.log = log
holder.log = log

del raw_image
del sdl_texture
Expand Down
4 changes: 3 additions & 1 deletion src/tauon/t_modules/t_bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
from pathlib import Path
from typing import Any

from tauon.__main__ import LogHistoryHandler

#@dataclass
class Holder:
"""Class that holds variables for forwarding them from tauon.py to t_main.py"""
Expand Down Expand Up @@ -36,6 +38,6 @@ class Holder:
t_agent: str # "TauonMusicBox/7.9.0"
dev_mode: bool
instance_lock: TextIOWrapper | None
log: Any
log: LogHistoryHandler

holder = Holder()
Loading

0 comments on commit d154656

Please sign in to comment.