From 64b654a700b34c03c385f67ce0c63634983ed8a2 Mon Sep 17 00:00:00 2001 From: SigureMo Date: Fri, 4 Aug 2023 09:45:47 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9E=96=20deps:=20remove=20pytest-parallel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/unit-test.yml | 2 +- .../checkers/dead_link_checker.py | 1 - dochooks/api_doc_checker/core/directives.py | 1 - justfile | 2 +- poetry.lock | 43 ++++++++++++------- pyproject.toml | 5 +-- .../test_check_and_format.py | 1 - 7 files changed, 31 insertions(+), 24 deletions(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index ad4151c..10e3a0c 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11-dev"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12-dev"] architecture: ["x64"] name: Python ${{ matrix.python-version }} on ${{ matrix.architecture }} test steps: diff --git a/dochooks/api_doc_checker/checkers/dead_link_checker.py b/dochooks/api_doc_checker/checkers/dead_link_checker.py index 1a3d557..140f294 100644 --- a/dochooks/api_doc_checker/checkers/dead_link_checker.py +++ b/dochooks/api_doc_checker/checkers/dead_link_checker.py @@ -18,7 +18,6 @@ class DeadLinkChecker(Checker): _links: list[tuple[Optional[int], str]] = [] def visit_reference(self, node: docutils.nodes.Element): - uri = node.get("refuri") self._links.append((node.line, uri)) diff --git a/dochooks/api_doc_checker/core/directives.py b/dochooks/api_doc_checker/core/directives.py index 2164320..25d59b4 100644 --- a/dochooks/api_doc_checker/core/directives.py +++ b/dochooks/api_doc_checker/core/directives.py @@ -161,7 +161,6 @@ def create_custom_directive(directive_name: str) -> type[docutils.parsers.rst.Di """ class _CustomDirective(docutils.parsers.rst.Directive): - has_content = True def run(self): diff --git a/justfile b/justfile index ab5d761..9917faa 100644 --- a/justfile +++ b/justfile @@ -1,7 +1,7 @@ VERSION := `poetry run python -c "import sys; from dochooks import __version__ as version; sys.stdout.write(version)"` test: - poetry run pytest --workers auto + poetry run pytest just clean fmt: diff --git a/poetry.lock b/poetry.lock index 2b1771c..c9ca3fb 100644 --- a/poetry.lock +++ b/poetry.lock @@ -23,31 +23,42 @@ trio = ["trio (<0.22)"] [[package]] name = "black" -version = "22.12.0" +version = "23.7.0" description = "The uncompromising code formatter." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "black-22.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9eedd20838bd5d75b80c9f5487dbcb06836a43833a37846cf1d8c1cc01cef59d"}, - {file = "black-22.12.0-cp310-cp310-win_amd64.whl", hash = "sha256:159a46a4947f73387b4d83e87ea006dbb2337eab6c879620a3ba52699b1f4351"}, - {file = "black-22.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d30b212bffeb1e252b31dd269dfae69dd17e06d92b87ad26e23890f3efea366f"}, - {file = "black-22.12.0-cp311-cp311-win_amd64.whl", hash = "sha256:7412e75863aa5c5411886804678b7d083c7c28421210180d67dfd8cf1221e1f4"}, - {file = "black-22.12.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c116eed0efb9ff870ded8b62fe9f28dd61ef6e9ddd28d83d7d264a38417dcee2"}, - {file = "black-22.12.0-cp37-cp37m-win_amd64.whl", hash = "sha256:1f58cbe16dfe8c12b7434e50ff889fa479072096d79f0a7f25e4ab8e94cd8350"}, - {file = "black-22.12.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:77d86c9f3db9b1bf6761244bc0b3572a546f5fe37917a044e02f3166d5aafa7d"}, - {file = "black-22.12.0-cp38-cp38-win_amd64.whl", hash = "sha256:82d9fe8fee3401e02e79767016b4907820a7dc28d70d137eb397b92ef3cc5bfc"}, - {file = "black-22.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:101c69b23df9b44247bd88e1d7e90154336ac4992502d4197bdac35dd7ee3320"}, - {file = "black-22.12.0-cp39-cp39-win_amd64.whl", hash = "sha256:559c7a1ba9a006226f09e4916060982fd27334ae1998e7a38b3f33a37f7a2148"}, - {file = "black-22.12.0-py3-none-any.whl", hash = "sha256:436cc9167dd28040ad90d3b404aec22cedf24a6e4d7de221bec2730ec0c97bcf"}, - {file = "black-22.12.0.tar.gz", hash = "sha256:229351e5a18ca30f447bf724d007f890f97e13af070bb6ad4c0a441cd7596a2f"}, + {file = "black-23.7.0-cp310-cp310-macosx_10_16_arm64.whl", hash = "sha256:5c4bc552ab52f6c1c506ccae05681fab58c3f72d59ae6e6639e8885e94fe2587"}, + {file = "black-23.7.0-cp310-cp310-macosx_10_16_universal2.whl", hash = "sha256:552513d5cd5694590d7ef6f46e1767a4df9af168d449ff767b13b084c020e63f"}, + {file = "black-23.7.0-cp310-cp310-macosx_10_16_x86_64.whl", hash = "sha256:86cee259349b4448adb4ef9b204bb4467aae74a386bce85d56ba4f5dc0da27be"}, + {file = "black-23.7.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:501387a9edcb75d7ae8a4412bb8749900386eaef258f1aefab18adddea1936bc"}, + {file = "black-23.7.0-cp310-cp310-win_amd64.whl", hash = "sha256:fb074d8b213749fa1d077d630db0d5f8cc3b2ae63587ad4116e8a436e9bbe995"}, + {file = "black-23.7.0-cp311-cp311-macosx_10_16_arm64.whl", hash = "sha256:b5b0ee6d96b345a8b420100b7d71ebfdd19fab5e8301aff48ec270042cd40ac2"}, + {file = "black-23.7.0-cp311-cp311-macosx_10_16_universal2.whl", hash = "sha256:893695a76b140881531062d48476ebe4a48f5d1e9388177e175d76234ca247cd"}, + {file = "black-23.7.0-cp311-cp311-macosx_10_16_x86_64.whl", hash = "sha256:c333286dc3ddca6fdff74670b911cccedacb4ef0a60b34e491b8a67c833b343a"}, + {file = "black-23.7.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:831d8f54c3a8c8cf55f64d0422ee875eecac26f5f649fb6c1df65316b67c8926"}, + {file = "black-23.7.0-cp311-cp311-win_amd64.whl", hash = "sha256:7f3bf2dec7d541b4619b8ce526bda74a6b0bffc480a163fed32eb8b3c9aed8ad"}, + {file = "black-23.7.0-cp38-cp38-macosx_10_16_arm64.whl", hash = "sha256:f9062af71c59c004cd519e2fb8f5d25d39e46d3af011b41ab43b9c74e27e236f"}, + {file = "black-23.7.0-cp38-cp38-macosx_10_16_universal2.whl", hash = "sha256:01ede61aac8c154b55f35301fac3e730baf0c9cf8120f65a9cd61a81cfb4a0c3"}, + {file = "black-23.7.0-cp38-cp38-macosx_10_16_x86_64.whl", hash = "sha256:327a8c2550ddc573b51e2c352adb88143464bb9d92c10416feb86b0f5aee5ff6"}, + {file = "black-23.7.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d1c6022b86f83b632d06f2b02774134def5d4d4f1dac8bef16d90cda18ba28a"}, + {file = "black-23.7.0-cp38-cp38-win_amd64.whl", hash = "sha256:27eb7a0c71604d5de083757fbdb245b1a4fae60e9596514c6ec497eb63f95320"}, + {file = "black-23.7.0-cp39-cp39-macosx_10_16_arm64.whl", hash = "sha256:8417dbd2f57b5701492cd46edcecc4f9208dc75529bcf76c514864e48da867d9"}, + {file = "black-23.7.0-cp39-cp39-macosx_10_16_universal2.whl", hash = "sha256:47e56d83aad53ca140da0af87678fb38e44fd6bc0af71eebab2d1f59b1acf1d3"}, + {file = "black-23.7.0-cp39-cp39-macosx_10_16_x86_64.whl", hash = "sha256:25cc308838fe71f7065df53aedd20327969d05671bac95b38fdf37ebe70ac087"}, + {file = "black-23.7.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:642496b675095d423f9b8448243336f8ec71c9d4d57ec17bf795b67f08132a91"}, + {file = "black-23.7.0-cp39-cp39-win_amd64.whl", hash = "sha256:ad0014efc7acf0bd745792bd0d8857413652979200ab924fbf239062adc12491"}, + {file = "black-23.7.0-py3-none-any.whl", hash = "sha256:9fd59d418c60c0348505f2ddf9609c1e1de8e7493eab96198fc89d9f865e7a96"}, + {file = "black-23.7.0.tar.gz", hash = "sha256:022a582720b0d9480ed82576c920a8c1dde97cc38ff11d8d8859b3bd6ca9eedb"}, ] [package.dependencies] click = ">=8.0.0" mypy-extensions = ">=0.4.3" +packaging = ">=22.0" pathspec = ">=0.9.0" platformdirs = ">=2" -tomli = {version = ">=1.1.0", markers = "python_full_version < \"3.11.0a7\""} +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} typing-extensions = {version = ">=3.10.0.0", markers = "python_version < \"3.10\""} [package.extras] @@ -587,4 +598,4 @@ rst-parser = ["docutils"] [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "36a80b8e9f311b6c0fe5fabd9c5c051ba846a6dab08f2c1993d0473805c44942" +content-hash = "dcfeb5b56f68ef02384cf2916f414046e496165f5b2ec4c84759233c17140fcf" diff --git a/pyproject.toml b/pyproject.toml index fb8888d..b90258d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,9 +12,8 @@ httpx = "^0.23.0" [tool.poetry.group.dev.dependencies] pytest = "^7.0" -black = "^22.1" -pytest-parallel = "^0.1.1" -isort = "^5.10.1" +black = "^23.7" +isort = "^5.12.0" tomli = { version = "^2.0.1", python = "<3.11" } pre-commit = "^2.20.0" types-docutils = "^0.19.0" diff --git a/tests/test_insert_whitespace_between_cn_and_en_char/test_check_and_format.py b/tests/test_insert_whitespace_between_cn_and_en_char/test_check_and_format.py index 89152ae..2936393 100644 --- a/tests/test_insert_whitespace_between_cn_and_en_char/test_check_and_format.py +++ b/tests/test_insert_whitespace_between_cn_and_en_char/test_check_and_format.py @@ -48,7 +48,6 @@ @pytest.mark.parametrize("need_format, unformatted, formatted", cases) def test_check_and_format(need_format: bool, unformatted: str, formatted: str): - if need_format: assert not check(unformatted) else: