Skip to content

Commit 88f2b4b

Browse files
author
Arturo R Montesinos
committed
fix: correct YAML branch indentation in render() (src and examples)
- Ensure `import yaml as _yaml` and print are inside fmt == "yaml" block
1 parent 21f4932 commit 88f2b4b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def render(obj: Any, args: argparse.Namespace) -> None:
242242
if not _HAVE_YAML:
243243
print("YAML output requested but PyYAML is not installed.", file=sys.stderr)
244244
sys.exit(2)
245-
import yaml as _yaml # type: ignore[import-untyped]
245+
import yaml as _yaml
246246
print(_yaml.safe_dump(_to_serializable(obj), sort_keys=False, allow_unicode=True))
247247
return
248248

@@ -269,7 +269,7 @@ def render(obj: Any, args: argparse.Namespace) -> None:
269269
return
270270
# Fallback to tabulate
271271
if _HAVE_TABULATE:
272-
from tabulate import tabulate as _tabulate # type: ignore[import-untyped]
272+
from tabulate import tabulate as _tabulate
273273

274274
print(
275275
_tabulate(

0 commit comments

Comments
 (0)