From 2e44ec203fbc24b8806ed44151bf1966ccad78ff Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 2 Mar 2024 04:28:35 -0600 Subject: [PATCH 1/4] py(deps): ruff 0.2.2 -> 0.3.0, et al. See also: https://github.com/astral-sh/ruff/blob/v0.3.0/CHANGELOG.md --- poetry.lock | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/poetry.lock b/poetry.lock index eb66a15..eff1b49 100644 --- a/poetry.lock +++ b/poetry.lock @@ -789,28 +789,28 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] [[package]] name = "ruff" -version = "0.2.2" +version = "0.3.0" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" files = [ - {file = "ruff-0.2.2-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:0a9efb032855ffb3c21f6405751d5e147b0c6b631e3ca3f6b20f917572b97eb6"}, - {file = "ruff-0.2.2-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:d450b7fbff85913f866a5384d8912710936e2b96da74541c82c1b458472ddb39"}, - {file = "ruff-0.2.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ecd46e3106850a5c26aee114e562c329f9a1fbe9e4821b008c4404f64ff9ce73"}, - {file = "ruff-0.2.2-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5e22676a5b875bd72acd3d11d5fa9075d3a5f53b877fe7b4793e4673499318ba"}, - {file = "ruff-0.2.2-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1695700d1e25a99d28f7a1636d85bafcc5030bba9d0578c0781ba1790dbcf51c"}, - {file = "ruff-0.2.2-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:b0c232af3d0bd8f521806223723456ffebf8e323bd1e4e82b0befb20ba18388e"}, - {file = "ruff-0.2.2-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f63d96494eeec2fc70d909393bcd76c69f35334cdbd9e20d089fb3f0640216ca"}, - {file = "ruff-0.2.2-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6a61ea0ff048e06de273b2e45bd72629f470f5da8f71daf09fe481278b175001"}, - {file = "ruff-0.2.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5e1439c8f407e4f356470e54cdecdca1bd5439a0673792dbe34a2b0a551a2fe3"}, - {file = "ruff-0.2.2-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:940de32dc8853eba0f67f7198b3e79bc6ba95c2edbfdfac2144c8235114d6726"}, - {file = "ruff-0.2.2-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:0c126da55c38dd917621552ab430213bdb3273bb10ddb67bc4b761989210eb6e"}, - {file = "ruff-0.2.2-py3-none-musllinux_1_2_i686.whl", hash = "sha256:3b65494f7e4bed2e74110dac1f0d17dc8e1f42faaa784e7c58a98e335ec83d7e"}, - {file = "ruff-0.2.2-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:1ec49be4fe6ddac0503833f3ed8930528e26d1e60ad35c2446da372d16651ce9"}, - {file = "ruff-0.2.2-py3-none-win32.whl", hash = "sha256:d920499b576f6c68295bc04e7b17b6544d9d05f196bb3aac4358792ef6f34325"}, - {file = "ruff-0.2.2-py3-none-win_amd64.whl", hash = "sha256:cc9a91ae137d687f43a44c900e5d95e9617cb37d4c989e462980ba27039d239d"}, - {file = "ruff-0.2.2-py3-none-win_arm64.whl", hash = "sha256:c9d15fc41e6054bfc7200478720570078f0b41c9ae4f010bcc16bd6f4d1aacdd"}, - {file = "ruff-0.2.2.tar.gz", hash = "sha256:e62ed7f36b3068a30ba39193a14274cd706bc486fad521276458022f7bccb31d"}, + {file = "ruff-0.3.0-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:7deb528029bacf845bdbb3dbb2927d8ef9b4356a5e731b10eef171e3f0a85944"}, + {file = "ruff-0.3.0-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:e1e0d4381ca88fb2b73ea0766008e703f33f460295de658f5467f6f229658c19"}, + {file = "ruff-0.3.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2f7dbba46e2827dfcb0f0cc55fba8e96ba7c8700e0a866eb8cef7d1d66c25dcb"}, + {file = "ruff-0.3.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:23dbb808e2f1d68eeadd5f655485e235c102ac6f12ad31505804edced2a5ae77"}, + {file = "ruff-0.3.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3ef655c51f41d5fa879f98e40c90072b567c666a7114fa2d9fe004dffba00932"}, + {file = "ruff-0.3.0-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:d0d3d7ef3d4f06433d592e5f7d813314a34601e6c5be8481cccb7fa760aa243e"}, + {file = "ruff-0.3.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b08b356d06a792e49a12074b62222f9d4ea2a11dca9da9f68163b28c71bf1dd4"}, + {file = "ruff-0.3.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9343690f95710f8cf251bee1013bf43030072b9f8d012fbed6ad702ef70d360a"}, + {file = "ruff-0.3.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a1f3ed501a42f60f4dedb7805fa8d4534e78b4e196f536bac926f805f0743d49"}, + {file = "ruff-0.3.0-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:cc30a9053ff2f1ffb505a585797c23434d5f6c838bacfe206c0e6cf38c921a1e"}, + {file = "ruff-0.3.0-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:5da894a29ec018a8293d3d17c797e73b374773943e8369cfc50495573d396933"}, + {file = "ruff-0.3.0-py3-none-musllinux_1_2_i686.whl", hash = "sha256:755c22536d7f1889be25f2baf6fedd019d0c51d079e8417d4441159f3bcd30c2"}, + {file = "ruff-0.3.0-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:dd73fe7f4c28d317855da6a7bc4aa29a1500320818dd8f27df95f70a01b8171f"}, + {file = "ruff-0.3.0-py3-none-win32.whl", hash = "sha256:19eacceb4c9406f6c41af806418a26fdb23120dfe53583df76d1401c92b7c14b"}, + {file = "ruff-0.3.0-py3-none-win_amd64.whl", hash = "sha256:128265876c1d703e5f5e5a4543bd8be47c73a9ba223fd3989d4aa87dd06f312f"}, + {file = "ruff-0.3.0-py3-none-win_arm64.whl", hash = "sha256:e3a4a6d46aef0a84b74fcd201a4401ea9a6cd85614f6a9435f2d33dd8cefbf83"}, + {file = "ruff-0.3.0.tar.gz", hash = "sha256:0886184ba2618d815067cf43e005388967b67ab9c80df52b32ec1152ab49f53a"}, ] [[package]] @@ -1122,24 +1122,24 @@ files = [ [[package]] name = "types-docutils" -version = "0.20.0.20240201" +version = "0.20.0.20240302" description = "Typing stubs for docutils" optional = false python-versions = ">=3.8" files = [ - {file = "types-docutils-0.20.0.20240201.tar.gz", hash = "sha256:ba4bfd4ff6dd19640ba7ab5d93900393a65897880f3650997964a943f4e79a6b"}, - {file = "types_docutils-0.20.0.20240201-py3-none-any.whl", hash = "sha256:79d3bcef235f7c81a63f4f3dcf1d0b138985079bb32d02f5a7d266e1f9f361ba"}, + {file = "types-docutils-0.20.0.20240302.tar.gz", hash = "sha256:cd2a00df09131f84b86efdacaa25b4594b44371f7a77846424e2fec17f3ead14"}, + {file = "types_docutils-0.20.0.20240302-py3-none-any.whl", hash = "sha256:092d32bcd27d0920cf5d2c72c945ed1c67dc1367a8cf1db9182d3e23f06b74e7"}, ] [[package]] name = "typing-extensions" -version = "4.9.0" +version = "4.10.0" description = "Backported and Experimental Type Hints for Python 3.8+" optional = false python-versions = ">=3.8" files = [ - {file = "typing_extensions-4.9.0-py3-none-any.whl", hash = "sha256:af72aea155e91adfc61c3ae9e0e342dbc0cba726d6cba4b6c72c1f34e47291cd"}, - {file = "typing_extensions-4.9.0.tar.gz", hash = "sha256:23478f88c37f27d76ac8aee6c905017a143b0b1b886c3c9f66bc2fd94f9f5783"}, + {file = "typing_extensions-4.10.0-py3-none-any.whl", hash = "sha256:69b1a937c3a517342112fb4c6df7e72fc39a38e7891a5730ed4985b5214b5475"}, + {file = "typing_extensions-4.10.0.tar.gz", hash = "sha256:b0abd7c89e8fb96f98db18d86106ff1d90ab692004eb746cf6eda2682f91b3cb"}, ] [[package]] From 6f4204e1d852a2021057354c3e76819297c2442b Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 2 Mar 2024 04:32:08 -0600 Subject: [PATCH 2/4] chore(ruff): format with ruff 0.3.0 See also: https://github.com/astral-sh/ruff/blob/v0.3.0/CHANGELOG.md --- docs/conf.py | 1 + src/doctest_docutils.py | 1 + src/gp_libs.py | 1 + src/linkify_issues.py | 1 + tests/conftest.py | 1 + tests/test_doctest_docutils.py | 1 + tests/test_linkify_issues.py | 1 + tests/test_pytest_doctest_docutils.py | 1 + 8 files changed, 8 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index 4bec42c..5b7241c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,5 +1,6 @@ # flake8: noqa: E501 """Sphinx configuration for gp_libs.""" + import contextlib import inspect import pathlib diff --git a/src/doctest_docutils.py b/src/doctest_docutils.py index f0e3b46..2316c69 100644 --- a/src/doctest_docutils.py +++ b/src/doctest_docutils.py @@ -1,4 +1,5 @@ """Doctest module for docutils.""" + import doctest import functools import linecache diff --git a/src/gp_libs.py b/src/gp_libs.py index dfaba14..9933209 100644 --- a/src/gp_libs.py +++ b/src/gp_libs.py @@ -1,4 +1,5 @@ """Metadata package for gp-libs.""" + __title__ = "gp-libs" __package_name__ = "gp_libs" __description__ = "Internal utilities for git-pull projects" diff --git a/src/linkify_issues.py b/src/linkify_issues.py index 49c6b77..2895685 100644 --- a/src/linkify_issues.py +++ b/src/linkify_issues.py @@ -1,4 +1,5 @@ """Autolinking extension for Sphinx.""" + import re import typing as t diff --git a/tests/conftest.py b/tests/conftest.py index 2c7592d..ca7a584 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -7,6 +7,7 @@ See "pytest_plugins in non-top-level conftest files" in https://docs.pytest.org/en/stable/deprecations.html """ + import pathlib import typing as t diff --git a/tests/test_doctest_docutils.py b/tests/test_doctest_docutils.py index 8e66b17..343ba18 100644 --- a/tests/test_doctest_docutils.py +++ b/tests/test_doctest_docutils.py @@ -1,4 +1,5 @@ """Tests for doctest_docutils.""" + import doctest import pathlib import textwrap diff --git a/tests/test_linkify_issues.py b/tests/test_linkify_issues.py index 41b9a23..800e1e6 100644 --- a/tests/test_linkify_issues.py +++ b/tests/test_linkify_issues.py @@ -1,4 +1,5 @@ """Tests for linkify_issues extension for sphinx.""" + import pathlib import typing as t diff --git a/tests/test_pytest_doctest_docutils.py b/tests/test_pytest_doctest_docutils.py index 71fa05b..3af1427 100644 --- a/tests/test_pytest_doctest_docutils.py +++ b/tests/test_pytest_doctest_docutils.py @@ -1,4 +1,5 @@ """Test pytest plugin for doctest_docutils.""" + import textwrap import typing as t From 333528f3d66a27de7a7d93959a757d021f106de2 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 2 Mar 2024 04:37:11 -0600 Subject: [PATCH 3/4] ci(ruff): use ruff check warning: `ruff ` is deprecated. Use `ruff check ` instead. See also: https://github.com/astral-sh/ruff/blob/v0.3.0/CHANGELOG.md --- .github/workflows/tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 862244d..12a5671 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -33,10 +33,10 @@ jobs: python -V poetry run python -V - - name: Lint with ruff - run: poetry run ruff . + - name: Lint with ruff check + run: poetry run ruff check . - - name: Format with ruff + - name: Format with ruff format run: poetry run ruff format . --check - name: Lint with mypy From 1de85eae6d6d4225833b19a023e1ed8e922e96a2 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 2 Mar 2024 04:38:42 -0600 Subject: [PATCH 4/4] docs(CHANGES): Bump ruff 0.2.2 -> 0.3.0 --- CHANGES | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES b/CHANGES index ad41026..b4fc672 100644 --- a/CHANGES +++ b/CHANGES @@ -14,6 +14,12 @@ $ pip install --user --upgrade --pre gp-libs ### Development +- ruff 0.2.2 -> 0.3.0 (#32) + + Related formattings. Update CI to use `ruff check .` instead of `ruff .`. + + See also: https://github.com/astral-sh/ruff/blob/v0.3.0/CHANGELOG.md + - Strengthen linting (#31) - Add flake8-commas (COM)