From 6137c73dd504e22dfc744af3ca4d8ea571b1ab81 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 16:38:32 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: f71fa2c1f9cf5cb705f73dffe4b21f7c61470ba9 → 2c9f875913ee60ca25ce70243dc24d5b6415598c](https://github.com/pre-commit/pre-commit-hooks/compare/f71fa2c1f9cf5cb705f73dffe4b21f7c61470ba9...2c9f875913ee60ca25ce70243dc24d5b6415598c) - [github.com/PyCQA/isort: dbf82f2dd09ae41d9355bcd7ab69187a19e6bf2f → c235f5e450b4b84e58d114ed4c589cbf454175a3](https://github.com/PyCQA/isort/compare/dbf82f2dd09ae41d9355bcd7ab69187a19e6bf2f...c235f5e450b4b84e58d114ed4c589cbf454175a3) - [github.com/psf/black: 193ee766ca496871f93621d6b58d57a6564ff81b → b965c2a5026f8ba399283ba3e01898b012853c79](https://github.com/psf/black/compare/193ee766ca496871f93621d6b58d57a6564ff81b...b965c2a5026f8ba399283ba3e01898b012853c79) - https://github.com/myint/docformatter → https://github.com/PyCQA/docformatter - [github.com/PyCQA/flake8: 10f4af6dbcf93456ba7df762278ae61ba3120dc6 → e43806be3607110919eff72939fda031776e885a](https://github.com/PyCQA/flake8/compare/10f4af6dbcf93456ba7df762278ae61ba3120dc6...e43806be3607110919eff72939fda031776e885a) --- .pre-commit-config.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e42d74e..3b66491 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: f71fa2c1f9cf5cb705f73dffe4b21f7c61470ba9 # frozen: v4.4.0 + rev: 2c9f875913ee60ca25ce70243dc24d5b6415598c # frozen: v4.6.0 hooks: - id: check-yaml - id: check-toml @@ -23,19 +23,19 @@ repos: hooks: - id: absolufy-imports - repo: https://github.com/PyCQA/isort - rev: dbf82f2dd09ae41d9355bcd7ab69187a19e6bf2f # frozen: 5.12.0 + rev: c235f5e450b4b84e58d114ed4c589cbf454175a3 # frozen: 5.13.2 hooks: - id: isort - repo: https://github.com/psf/black - rev: 193ee766ca496871f93621d6b58d57a6564ff81b # frozen: 23.7.0 + rev: b965c2a5026f8ba399283ba3e01898b012853c79 # frozen: 24.8.0 hooks: - id: black -- repo: https://github.com/myint/docformatter +- repo: https://github.com/PyCQA/docformatter rev: dfefe062799848234b4cd60b04aa633c0608025e # frozen: v1.7.5 hooks: - id: docformatter - repo: https://github.com/PyCQA/flake8 - rev: 10f4af6dbcf93456ba7df762278ae61ba3120dc6 # frozen: 6.1.0 + rev: e43806be3607110919eff72939fda031776e885a # frozen: 7.1.1 hooks: - id: flake8 additional_dependencies: From 9247bd80361afb314dec5a723e45ee526f269aa0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 16:40:04 +0000 Subject: [PATCH 2/2] [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 39491cd..6a61ca2 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 c0cc768..1a72919 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 adce7cf..469aa58 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 bb477c3..e8e52b9 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 d160562..806e848 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