Akascape / py-window-styles

Customize your python UI window with awesome pre-built windows 11 themes.
Creative Commons Zero v1.0 Universal
257 stars 15 forks source link

Fix a error #20

Closed rudymohammadbali closed 2 months ago

rudymohammadbali commented 3 months ago

Error:

def ChangeDWMAccent(hWnd: int, attrib: int, state: int, color: str | None = None) -> None:
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

The | operator only supports python 3.10 and newer.

Fix:

from typing import Union

def ChangeDWMAccent(hWnd: int, attrib: int, state: int, color: Union[str, None] = None) -> None: