From 89401a65d38057c88534e0aeaee53db2e6377249 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= <hugo@lysator.liu.se> Date: Tue, 19 Sep 2023 07:33:47 +0200 Subject: [PATCH] Minor fixes. --- muppet/puppet/__main__.py | 2 +- muppet/syntax_highlight/andre_simon.py | 2 +- muppet/syntax_highlight/pygments.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/muppet/puppet/__main__.py b/muppet/puppet/__main__.py index 080a2db..4209c9f 100644 --- a/muppet/puppet/__main__.py +++ b/muppet/puppet/__main__.py @@ -36,7 +36,7 @@ def __main() -> None: def output(thingy: Any) -> None: match args.format: case 'json': - json.dump(result, sys.stdout, indent=args.pretty) + json.dump(thingy, sys.stdout, indent=args.pretty) print() case 'python': if indent := args.pretty: diff --git a/muppet/syntax_highlight/andre_simon.py b/muppet/syntax_highlight/andre_simon.py index 7bbcd43..8cd6b8d 100644 --- a/muppet/syntax_highlight/andre_simon.py +++ b/muppet/syntax_highlight/andre_simon.py @@ -22,7 +22,7 @@ def highlight(code: str, language: str) -> str: '--fragment', '--line-numbers', '--anchors', - '--anchors-prefix=line', + '--anchor-prefix=line', '--class-name=NONE', '--syntax', language, '--enclose-pre'], diff --git a/muppet/syntax_highlight/pygments.py b/muppet/syntax_highlight/pygments.py index 4a8fc72..33a1c6c 100644 --- a/muppet/syntax_highlight/pygments.py +++ b/muppet/syntax_highlight/pygments.py @@ -6,7 +6,7 @@ try: from pygments.lexers import get_lexer_by_name import pygments available = True -except ModuleNotFoundError: +except ModuleNotFoundError: # pragma: no cover available = False -- GitLab