Skip to content

Commit 35b9dfd

Browse files
committed
Fix imports
1 parent 459c5ef commit 35b9dfd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/pygamepopup/configuration.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,17 @@
55
from __future__ import annotations
66

77
import os
8+
from os.path import abspath
9+
from typing import Union
810

911
import pkg_resources
1012
import pygame
1113

12-
from pygamepopup.constants import WHITE
14+
from .constants import WHITE
1315

1416
resource_package = __name__
1517

16-
_default_sprites: dict[str, dict[str, str]] = {
18+
_default_sprites: dict[str, Union[dict[str, str], str]] = {
1719
"button_background": {
1820
"inactive": pkg_resources.resource_filename(
1921
resource_package, "/".join(("images", "default_box.png"))
@@ -94,7 +96,7 @@ def set_info_box_background(info_box_background_path: str) -> None:
9496
Keyword Args:
9597
info_box_background_path (str): the path to the background sprite to be set.
9698
"""
97-
_default_sprites["info_box_background"] = os.path.abspath(info_box_background_path)
99+
_default_sprites["info_box_background"] = abspath(info_box_background_path)
98100

99101

100102
def set_button_title_font(font: pygame.font.Font) -> None:

0 commit comments

Comments
 (0)