-
-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor initialization, functions and classes #1388
Draft
C0rn3j
wants to merge
8
commits into
Taiko2k:master
Choose a base branch
from
C0rn3j:800
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f7da9a9
to
455399d
Compare
6d4f331
to
7e12556
Compare
226f583
to
6015c4a
Compare
This was referenced Feb 24, 2025
C0rn3j
added a commit
to C0rn3j/Tauon
that referenced
this pull request
Feb 26, 2025
This was referenced Feb 26, 2025
C0rn3j
added a commit
to C0rn3j/Tauon
that referenced
this pull request
Feb 28, 2025
C0rn3j
added a commit
to C0rn3j/Tauon
that referenced
this pull request
Feb 28, 2025
Taiko2k
pushed a commit
that referenced
this pull request
Mar 1, 2025
This was referenced Mar 2, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is effectively a complete refactor of Tauon's Python side.
This introduces a new dataclass called
Bag
int_main.py
, created afterPrefs
(technically it could be merged intoPrefs
, but that is big enough and it's not a Preference but mostly an object holder), which partially absorbs the initialHolder
from__main__.py
, and later theTauon
class absorbsBag
andHolder
.Things were rearranged to allow this hierarchy, most classes are now initialized within
Tauon
orPlayerCtl
, as needed.This allows us to pass
Holder
,Bag
and laterTauon
everywhere, allowing access to all the things that used to be either explicit or implicit globals, all the while allowing type checkers to understand the code and not crash/timeout as is the current case withmaster
.Launches, but has a couple issues I've managed to introduce (likely when removing the globals), the code is a little ugly at the moment in parts, and it is far from done, albeit mergeable if it weren't for the new issues.
I've been chopping this PR up into pieces and sending the working bits to
master
in a reviewable fashion for now, as it touches 37K lines at the time of writing, out of the total 47K~.Biggest problems with this WIP branch are:
threading.Thread(target=self.notify_song_fire, args=([self.song_notification, delay, id]))
TODO(Martin)
The goals here are:
LoadImageAsset
,WhiteModImageAsset
,TextBox
andTextBox2
are leftConvert Prefs to dataclasst_bootstrap.py
by turning its contents into a regular class object, currently it functions as a global object import of sorts. Instead we'll create amain()
function int_main.py
to be able to pass it, to do so we'll have to get rid of doing everything in the top level of the module2025-03-03 -
4352
Ruff issues,27804
Pyright issues in master2025-03-02 -
3968
Ruff issues,14947
Pyright issues in PR2025-03-03 -
2946
Ruff issues,14261
Pyright issues in PR (1K Ruff issues are line-too-long which are hidden for now)2025-03-04 -
2544
Ruff issues,14468
Pyright issues in PR