From e57bc36a1124875710c0bc7ff490b24cb0e42c2e Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 2 Mar 2024 04:30:27 -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 6a768ecf..79cbe499 100644 --- a/poetry.lock +++ b/poetry.lock @@ -654,13 +654,13 @@ windows-terminal = ["colorama (>=0.4.6)"] [[package]] name = "pytest" -version = "8.0.1" +version = "8.0.2" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.8" files = [ - {file = "pytest-8.0.1-py3-none-any.whl", hash = "sha256:3e4f16fe1c0a9dc9d9389161c127c3edc5d810c38d6793042fb81d9f48a59fca"}, - {file = "pytest-8.0.1.tar.gz", hash = "sha256:267f6563751877d772019b13aacbe4e860d73fe8f651f28112e9ac37de7513ae"}, + {file = "pytest-8.0.2-py3-none-any.whl", hash = "sha256:edfaaef32ce5172d5466b5127b42e0d6d35ebbe4453f0e3505d96afd93f6b096"}, + {file = "pytest-8.0.2.tar.gz", hash = "sha256:d4051d623a2e0b7e51960ba963193b09ce6daeb9759a451844a21e4ddedfc1bd"}, ] [package.dependencies] @@ -804,28 +804,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]] @@ -1195,13 +1195,13 @@ urllib3 = ">=2" [[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 0ce9556cc9aab45f5a64bad6aff62f7e9e427e76 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 2 Mar 2024 04:33:35 -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 --- conftest.py | 1 + docs/conf.py | 1 + scripts/generate_gitlab.py | 1 + src/vcspull/__about__.py | 1 + src/vcspull/__init__.py | 1 + src/vcspull/cli/__init__.py | 7 +++---- src/vcspull/cli/sync.py | 1 + src/vcspull/config.py | 1 + src/vcspull/log.py | 1 + src/vcspull/types.py | 1 + src/vcspull/util.py | 1 + src/vcspull/validator.py | 1 + tests/__init__.py | 1 + tests/fixtures/example.py | 1 + tests/helpers.py | 1 + tests/test_cli.py | 1 + tests/test_config.py | 1 + tests/test_config_file.py | 1 + tests/test_repo.py | 1 + tests/test_sync.py | 1 + tests/test_utils.py | 1 + 21 files changed, 23 insertions(+), 4 deletions(-) diff --git a/conftest.py b/conftest.py index 6378eceb..27eb90d7 100644 --- a/conftest.py +++ b/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 shutil import typing as t diff --git a/docs/conf.py b/docs/conf.py index 7f02236d..61be76c0 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,4 +1,5 @@ """Sphinx configuration for vcspull documentation.""" + # flake8: noqa: E501 import inspect import pathlib diff --git a/scripts/generate_gitlab.py b/scripts/generate_gitlab.py index d0c2e3f7..a896e77d 100755 --- a/scripts/generate_gitlab.py +++ b/scripts/generate_gitlab.py @@ -1,5 +1,6 @@ #!/usr/bin/env python """Example script for export gitlab organization to vcspull config file.""" + import argparse import os import pathlib diff --git a/src/vcspull/__about__.py b/src/vcspull/__about__.py index 191540e2..3af5d425 100644 --- a/src/vcspull/__about__.py +++ b/src/vcspull/__about__.py @@ -1,4 +1,5 @@ """Metadata for vcspull.""" + __title__ = "vcspull" __package_name__ = "vcspull" __description__ = "Manage and sync multiple git, mercurial, and svn repos" diff --git a/src/vcspull/__init__.py b/src/vcspull/__init__.py index 77f0467a..303d0ed9 100644 --- a/src/vcspull/__init__.py +++ b/src/vcspull/__init__.py @@ -4,6 +4,7 @@ :copyright: Copyright 2013-2018 Tony Narlock. :license: MIT, see LICENSE for details """ + # Set default logging handler to avoid "No handler found" warnings. import logging from logging import NullHandler diff --git a/src/vcspull/cli/__init__.py b/src/vcspull/cli/__init__.py index af99f568..5d448e54 100644 --- a/src/vcspull/cli/__init__.py +++ b/src/vcspull/cli/__init__.py @@ -1,4 +1,5 @@ """CLI utilities for vcspull.""" + import argparse import logging import textwrap @@ -30,13 +31,11 @@ @overload def create_parser( return_subparsers: t.Literal[True], -) -> tuple[argparse.ArgumentParser, t.Any]: - ... +) -> tuple[argparse.ArgumentParser, t.Any]: ... @overload -def create_parser(return_subparsers: t.Literal[False]) -> argparse.ArgumentParser: - ... +def create_parser(return_subparsers: t.Literal[False]) -> argparse.ArgumentParser: ... def create_parser( diff --git a/src/vcspull/cli/sync.py b/src/vcspull/cli/sync.py index db755266..9b362b2c 100644 --- a/src/vcspull/cli/sync.py +++ b/src/vcspull/cli/sync.py @@ -1,4 +1,5 @@ """Synchronization functionality for vcspull.""" + import argparse import logging import pathlib diff --git a/src/vcspull/config.py b/src/vcspull/config.py index 6b0373d5..70e52a57 100644 --- a/src/vcspull/config.py +++ b/src/vcspull/config.py @@ -1,4 +1,5 @@ """Configuration functionality for vcspull.""" + import fnmatch import logging import os diff --git a/src/vcspull/log.py b/src/vcspull/log.py index 5ae4f2c2..69ff287b 100644 --- a/src/vcspull/log.py +++ b/src/vcspull/log.py @@ -6,6 +6,7 @@ Colorized formatters for generic logging inside the application is also provided. """ + import logging import time import typing as t diff --git a/src/vcspull/types.py b/src/vcspull/types.py index b83f8ee9..cb95d1c0 100644 --- a/src/vcspull/types.py +++ b/src/vcspull/types.py @@ -1,4 +1,5 @@ """Typings for vcspull.""" + import pathlib import typing as t diff --git a/src/vcspull/util.py b/src/vcspull/util.py index bd174b72..c2085f36 100644 --- a/src/vcspull/util.py +++ b/src/vcspull/util.py @@ -1,4 +1,5 @@ """Utility functions for vcspull.""" + import os import pathlib import typing as t diff --git a/src/vcspull/validator.py b/src/vcspull/validator.py index a039617e..93af6b14 100644 --- a/src/vcspull/validator.py +++ b/src/vcspull/validator.py @@ -1,4 +1,5 @@ """Validation of vcspull configuration file.""" + import pathlib import typing as t diff --git a/tests/__init__.py b/tests/__init__.py index cb2ce9c1..3884ee1f 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,2 +1,3 @@ """Tests for vcspull package.""" + from . import fixtures diff --git a/tests/fixtures/example.py b/tests/fixtures/example.py index c92b1ae4..061f2d99 100644 --- a/tests/fixtures/example.py +++ b/tests/fixtures/example.py @@ -1,4 +1,5 @@ """Example fixture data for vcspull tests.""" + import pathlib import typing as t diff --git a/tests/helpers.py b/tests/helpers.py index 424fa15f..a238efdc 100644 --- a/tests/helpers.py +++ b/tests/helpers.py @@ -1,4 +1,5 @@ """Helpers for vcspull.""" + import os import pathlib import typing as t diff --git a/tests/test_cli.py b/tests/test_cli.py index 20629a3c..c35bf9b5 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1,4 +1,5 @@ """Test CLI entry point for for vcspull.""" + import contextlib import pathlib import shutil diff --git a/tests/test_config.py b/tests/test_config.py index 537151b0..0ed1b9fb 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1,4 +1,5 @@ """Tests for vcspull configuration format.""" + import pathlib import typing as t diff --git a/tests/test_config_file.py b/tests/test_config_file.py index 0ba9571d..40bb67ac 100644 --- a/tests/test_config_file.py +++ b/tests/test_config_file.py @@ -1,4 +1,5 @@ """Tests for vcspull configuration files.""" + import os import pathlib import textwrap diff --git a/tests/test_repo.py b/tests/test_repo.py index 36107a4c..079116fb 100644 --- a/tests/test_repo.py +++ b/tests/test_repo.py @@ -1,4 +1,5 @@ """Tests for placing config dicts into :py:class:`Project` objects.""" + import pathlib from libvcs import BaseSync, GitSync, HgSync, SvnSync diff --git a/tests/test_sync.py b/tests/test_sync.py index 1d2e2061..c6677898 100644 --- a/tests/test_sync.py +++ b/tests/test_sync.py @@ -1,4 +1,5 @@ """Tests for sync functionality of vcspull.""" + import pathlib import textwrap import typing as t diff --git a/tests/test_utils.py b/tests/test_utils.py index b3aeb92c..b4799fe9 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -1,4 +1,5 @@ """Tests for vcspull utilities.""" + import pathlib import pytest From 74b8fe0f742352f627e9d9bcd542b697ba580e35 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 2 Mar 2024 04:50:30 -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 b2e7f153..d531f4a2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -30,10 +30,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 7e5f2b48b8967efd626071249b6db352bd7de80a Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 2 Mar 2024 04:50:12 -0600 Subject: [PATCH 4/4] docs(CHANGES): Bump ruff 0.2.2 -> 0.3.0 --- CHANGES | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGES b/CHANGES index 9a32b052..0ffde47b 100644 --- a/CHANGES +++ b/CHANGES @@ -21,6 +21,14 @@ $ pipx install --suffix=@next 'vcspull' --pip-args '\--pre' --force +### Development + +- ruff 0.2.2 -> 0.3.0 (#441) + + 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 + ## vcspull v1.28.1 (2024-02-17) ### Fixes