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: Fixed and enforced types + logger class rewrite #201

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Type alias for Wine dll override types
Root-Core committed Jan 8, 2025
commit fc9ca8e31d00275ad271f824d740e324acee2369
4 changes: 2 additions & 2 deletions util.py
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@

# TypeAliases
BasePathType = Literal['user', 'game']

OverrideTypes = Literal['n', 'b', 'n,b', 'b,n', '']

def which(appname: str) -> Optional[str]:
"""Returns the full path of an executable in $PATH"""
@@ -413,7 +413,7 @@ def get_game_install_path() -> str:
return install_path


def winedll_override(dll: str, dtype: Literal['n', 'b', 'n,b', 'b,n', '']) -> None:
def winedll_override(dll: str, dtype: OverrideTypes) -> None:
"""Add WINE dll override"""
log.info(f'Overriding {dll}.dll = {dtype}')
setting = f'{dll}={dtype}'