Skip to content
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
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

C0rn3j
Copy link
Collaborator

@C0rn3j C0rn3j commented Jan 12, 2025

The goals here are:

  • Rework functions and classes to be initialized without implicitly relying on globals
  • Remove all globals
  • Convert Prefs to dataclass
  • Get rid of t_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 a main() function in t_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 module

Early WIP, launches but crashes easily, somewhat ugly at the moment.

Somewhat arrange to current upstream state

Small Prefs fix up

Bootstrap: Use dataclass

t_main reworks

Move classes on top of main

More reworking

GuiVar: Remove duplicated macOS detection

More rework

More rework, create class Formats, remove global formats

Fix colon convention

Remove empty rework file

More refactoring

Add more typing

More rework

Remove old comment

Refactor

Refactor fixups

Moar refactor

Refactor class Tauon

Fix up asset_loader()

Moar refactor

More reworks

Remove doubled ctypes import

More refactor

Further refactor and add accidentally deleted classes back

Premove touchups

Add Bag to Tauon and continue refactoring

pctl reworks

Move some things around and rename devance func to "previous"

further reworks

Further reworks

Further reworks

More refactoring, convert Prefs to a dataclass, to be merged with Bag

Small refactor

Small refactor + adapt some upstream changes

fix lastfm url

Start using classes for Radio playlists and stations (Taiko2k#1422)

* Radio changes WIP

* Fix ups to get it running

* Add migrations

* Convert more code

* Fix broken buttons

* Do not wipe website URL if stream URL hasn't changed

* Handle radio websocket better

* Fix indent

* Add the default station fallback URL back

* Fix up adding radio and m3u radio

* Fix if

* Fix comma

Fix merge issues

Start up more refactors

Further reworks and global eliminations

More reworks

More reworks, just kill me already

Theme refactor

Shoot me noooow, this is a call for heeeelp

MORE REWORKS

Probably enough for today

More input refactors

Fix get_track_in_playlist()

Stash some more reworks

Further refactors

Simplify Menu

Moar Reeefactor

More refactor
@C0rn3j C0rn3j changed the title Refactor initialization and classes Refactor initialization, functions and classes Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant