We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be0fe13 commit 8676e1bCopy full SHA for 8676e1b
src/pytest_html/__init__.py
@@ -1,4 +1,3 @@
1
-# type: ignore
2
try:
3
from . import __version
4
src/pytest_html/util.py
@@ -1,13 +1,14 @@
import importlib
from functools import lru_cache
+from types import ModuleType
+from typing import Optional
5
6
7
@lru_cache()
-def ansi_support():
8
+def ansi_support() -> Optional[ModuleType]:
9
10
# from ansi2html import Ansi2HTMLConverter, style # NOQA
11
return importlib.import_module("ansi2html")
12
except ImportError:
13
# ansi2html is not installed
- pass
14
+ return None
0 commit comments