mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-04 15:04:31 +00:00
import rich, except ImportError s
This commit is contained in:
parent
c39fb7f1b8
commit
e5cc601482
3 changed files with 4 additions and 4 deletions
|
@ -8,7 +8,7 @@ from typing import Callable, TypeVar, Generic
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from rich.pretty import pprint as rich_pprint
|
from rich.pretty import pprint as rich_pprint
|
||||||
except ModuleNotFoundError:
|
except ImportError:
|
||||||
rich_pprint = print
|
rich_pprint = print
|
||||||
|
|
||||||
from . import Resource, File, GetResourceAtResult
|
from . import Resource, File, GetResourceAtResult
|
||||||
|
|
|
@ -10,7 +10,7 @@ from typing import TYPE_CHECKING, Union, Optional, Callable
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from rich.pretty import pprint as rich_pprint
|
from rich.pretty import pprint as rich_pprint
|
||||||
except ModuleNotFoundError:
|
except ImportError:
|
||||||
rich_pprint = print
|
rich_pprint = print
|
||||||
|
|
||||||
import pygfxd
|
import pygfxd
|
||||||
|
|
|
@ -108,7 +108,7 @@ def process_pool(
|
||||||
import rich
|
import rich
|
||||||
|
|
||||||
rich.print(f"[b]{colls_str}[/b]")
|
rich.print(f"[b]{colls_str}[/b]")
|
||||||
except:
|
except ImportError:
|
||||||
print(colls_str)
|
print(colls_str)
|
||||||
|
|
||||||
file_by_rescoll: dict[ResourcesDescCollection, File] = dict()
|
file_by_rescoll: dict[ResourcesDescCollection, File] = dict()
|
||||||
|
@ -488,7 +488,7 @@ def main():
|
||||||
try:
|
try:
|
||||||
import rich.pretty
|
import rich.pretty
|
||||||
import rich.console
|
import rich.console
|
||||||
except:
|
except ImportError:
|
||||||
traceback.print_exc(file=sys.stdout)
|
traceback.print_exc(file=sys.stdout)
|
||||||
print("Install rich for prettier output (`pip install rich`)")
|
print("Install rich for prettier output (`pip install rich`)")
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue