From 0ef7570b0ea3da5108e9589da74a18714c6cba15 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 16:37:33 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/mdformat/_cli.py | 6 +++--- src/mdformat/codepoints/_unicode_punctuation.py | 1 + src/mdformat/codepoints/_unicode_whitespace.py | 1 + tests/test_commonmark_spec.py | 8 +++++--- tests/test_for_profiler.py | 1 + 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/mdformat/_cli.py b/src/mdformat/_cli.py index 39491cd8..6a61ca26 100644 --- a/src/mdformat/_cli.py +++ b/src/mdformat/_cli.py @@ -128,9 +128,9 @@ def make_arg_parser( plugin_versions_str = get_plugin_versions_str(parser_extensions, codeformatters) parser = argparse.ArgumentParser( description="CommonMark compliant Markdown formatter", - epilog=f"Installed plugins: {plugin_versions_str}" - if plugin_versions_str - else None, + epilog=( + f"Installed plugins: {plugin_versions_str}" if plugin_versions_str else None + ), ) parser.add_argument("paths", nargs="*", help="files to format") parser.add_argument( diff --git a/src/mdformat/codepoints/_unicode_punctuation.py b/src/mdformat/codepoints/_unicode_punctuation.py index c0cc768b..1a729194 100644 --- a/src/mdformat/codepoints/_unicode_punctuation.py +++ b/src/mdformat/codepoints/_unicode_punctuation.py @@ -2,6 +2,7 @@ Run this module to generate and print an up-to-date set of characters. """ + UNICODE_PUNCTUATION = frozenset( ( "!", diff --git a/src/mdformat/codepoints/_unicode_whitespace.py b/src/mdformat/codepoints/_unicode_whitespace.py index adce7cf4..469aa581 100644 --- a/src/mdformat/codepoints/_unicode_whitespace.py +++ b/src/mdformat/codepoints/_unicode_whitespace.py @@ -2,6 +2,7 @@ Run this module to generate and print an up-to-date set of characters. """ + UNICODE_WHITESPACE = frozenset( ( "\t", diff --git a/tests/test_commonmark_spec.py b/tests/test_commonmark_spec.py index bb477c38..e8e52b9d 100644 --- a/tests/test_commonmark_spec.py +++ b/tests/test_commonmark_spec.py @@ -101,9 +101,11 @@ "entry", ALL_CASES, ids=[ - c.values[0]["name"] # type: ignore[index] - if isinstance(c, ParameterSet) - else c["name"] + ( + c.values[0]["name"] # type: ignore[index] + if isinstance(c, ParameterSet) + else c["name"] + ) for c in ALL_CASES ], ) diff --git a/tests/test_for_profiler.py b/tests/test_for_profiler.py index d1605628..806e8486 100644 --- a/tests/test_for_profiler.py +++ b/tests/test_for_profiler.py @@ -7,6 +7,7 @@ - `tox -e profile` - `firefox .tox/prof/combined.svg` """ + from pathlib import Path from mdformat._cli import run