Skip to content

Commit 18f8af7

Browse files
committed
Pass strings or tuples of strings to _dbg
1 parent 1557585 commit 18f8af7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

setup.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
import sys
1717
import warnings
1818
from collections.abc import Iterator
19-
from typing import Any
2019

2120
from setuptools import Extension, setup
2221
from setuptools.command.build_ext import build_ext
@@ -148,7 +147,7 @@ class RequiredDependencyException(Exception):
148147
PLATFORM_MINGW = os.name == "nt" and "GCC" in sys.version
149148

150149

151-
def _dbg(s: str, tp: Any = None) -> None:
150+
def _dbg(s: str, tp: str | tuple[str, ...] | None = None) -> None:
152151
if DEBUG:
153152
if tp:
154153
print(s % tp)
@@ -732,7 +731,7 @@ def build_extensions(self) -> None:
732731
best_path = os.path.join(directory, name)
733732
_dbg(
734733
"Best openjpeg version %s so far in %s",
735-
(best_version, best_path),
734+
(str(best_version), best_path),
736735
)
737736

738737
if best_version and _find_library_file(self, "openjp2"):

0 commit comments

Comments
 (0)