From 8abc77e868dfc9e2cfdc2d09779074814f8829fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9=20=D0=91=D0=BB?= =?UTF-8?q?=D0=B8=D0=BD=D0=BE=D0=B2?= Date: Wed, 27 May 2026 15:50:59 +0300 Subject: [PATCH 01/10] Enable isort combine-as-imports in ruff config --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 952b6fa..783599f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,6 +65,7 @@ testpaths = ["tests/documentation", "tests/typing", "tests/units"] [tool.ruff] lint.ignore = ['E501', 'E712', 'PTH123', 'PTH118', 'PLR2004', 'PTH107', 'SIM105', 'SIM102', 'RET503', 'PLR0912', 'C901', 'E731', 'F821'] lint.select = ["ERA001", "YTT", "ASYNC", "BLE", "B", "A", "COM", "INP", "PIE", "T20", "PT", "RSE", "RET", "SIM", "SLOT", "TID252", "ARG", "PTH", "I", "C90", "N", "E", "W", "D201", "D202", "D419", "F", "PL", "PLE", "PLR", "PLW", "RUF", "TRY201", "TRY400", "TRY401"] +lint.isort.combine-as-imports = true format.quote-style = "single" [project.urls] From 29e66e1adacff4d105376437dd6739653a919585 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9=20=D0=91=D0=BB?= =?UTF-8?q?=D0=B8=D0=BD=D0=BE=D0=B2?= Date: Wed, 27 May 2026 15:51:24 +0300 Subject: [PATCH 02/10] Fix error import order and add missing aliases in suby modules --- suby/__init__.py | 10 +++++----- suby/errors.py | 6 ++++-- suby/run.py | 4 ++-- tests/typing/test_typing_run.py | 2 -- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/suby/__init__.py b/suby/__init__.py index c4cf99b..9f5b8e2 100644 --- a/suby/__init__.py +++ b/suby/__init__.py @@ -1,10 +1,10 @@ -from suby.errors import ConditionCancellationError as ConditionCancellationError from suby.errors import ( + ConditionCancellationError as ConditionCancellationError, EnvironmentVariablesConflict as EnvironmentVariablesConflict, + RunningCommandError as RunningCommandError, + TimeoutCancellationError as TimeoutCancellationError, + WrongCommandError as WrongCommandError, + WrongDirectoryError as WrongDirectoryError, ) -from suby.errors import RunningCommandError as RunningCommandError -from suby.errors import TimeoutCancellationError as TimeoutCancellationError -from suby.errors import WrongCommandError as WrongCommandError -from suby.errors import WrongDirectoryError as WrongDirectoryError from suby.run import run as run from suby.subprocess_result import SubprocessResult as SubprocessResult diff --git a/suby/errors.py b/suby/errors.py index 12e3f01..840682a 100644 --- a/suby/errors.py +++ b/suby/errors.py @@ -1,5 +1,7 @@ -from cantok import ConditionCancellationError as CantokConditionCancellationError -from cantok import TimeoutCancellationError as CantokTimeoutCancellationError +from cantok import ( + ConditionCancellationError as CantokConditionCancellationError, + TimeoutCancellationError as CantokTimeoutCancellationError, +) from suby.subprocess_result import SubprocessResult diff --git a/suby/run.py b/suby/run.py index 659a58e..cc7a60b 100644 --- a/suby/run.py +++ b/suby/run.py @@ -36,11 +36,11 @@ from cantok import ( AbstractToken, CancellationError, + ConditionCancellationError as CantokConditionCancellationError, DefaultToken, + TimeoutCancellationError as CantokTimeoutCancellationError, TimeoutToken, ) -from cantok import ConditionCancellationError as CantokConditionCancellationError -from cantok import TimeoutCancellationError as CantokTimeoutCancellationError from emptylog import EmptyLogger, LoggerProtocol from sigmatch import PossibleCallMatcher, SignatureMismatchError diff --git a/tests/typing/test_typing_run.py b/tests/typing/test_typing_run.py index 39c4227..e450fed 100644 --- a/tests/typing/test_typing_run.py +++ b/tests/typing/test_typing_run.py @@ -18,8 +18,6 @@ ) from suby.errors import ( EnvironmentVariablesConflict as ModuleEnvironmentVariablesConflict, -) -from suby.errors import ( WrongDirectoryError as ModuleWrongDirectoryError, ) from suby.subprocess_result import SubprocessResult From 9de0eaa0b0d9212207b968a2d0b1a996ca7a87e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9=20=D0=91=D0=BB?= =?UTF-8?q?=D0=B8=D0=BD=D0=BE=D0=B2?= Date: Wed, 27 May 2026 15:52:03 +0300 Subject: [PATCH 03/10] Bumped version to 0.0.11 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 783599f..720b29e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi" [project] name = "suby" -version = "0.0.10" +version = "0.0.11" authors = [ { name="Evgeniy Blinov", email="zheni-b@yandex.ru" }, ] From e68ca665edef2271035d3c244f067d4faa75fa80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9=20=D0=91=D0=BB?= =?UTF-8?q?=D0=B8=D0=BD=D0=BE=D0=B2?= Date: Wed, 27 May 2026 15:52:32 +0300 Subject: [PATCH 04/10] Update sigmatch dependency to version 0.0.10 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 720b29e..f563055 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ dependencies = [ 'emptylog>=0.0.12', 'cantok>=0.0.36', 'microbenchmark>=0.0.3', - 'sigmatch>=0.0.9', + 'sigmatch>=0.0.10', ] classifiers = [ "Operating System :: OS Independent", From e3f161abd1c1e329a1e74c6361969092dd916fa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9=20=D0=91=D0=BB?= =?UTF-8?q?=D0=B8=D0=BD=D0=BE=D0=B2?= Date: Fri, 26 Jun 2026 17:43:54 +0300 Subject: [PATCH 05/10] Update isort config to force single-line imports --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index f563055..9e3ef56 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -66,6 +66,7 @@ testpaths = ["tests/documentation", "tests/typing", "tests/units"] lint.ignore = ['E501', 'E712', 'PTH123', 'PTH118', 'PLR2004', 'PTH107', 'SIM105', 'SIM102', 'RET503', 'PLR0912', 'C901', 'E731', 'F821'] lint.select = ["ERA001", "YTT", "ASYNC", "BLE", "B", "A", "COM", "INP", "PIE", "T20", "PT", "RSE", "RET", "SIM", "SLOT", "TID252", "ARG", "PTH", "I", "C90", "N", "E", "W", "D201", "D202", "D419", "F", "PL", "PLE", "PLR", "PLW", "RUF", "TRY201", "TRY400", "TRY401"] lint.isort.combine-as-imports = true +lint.isort.force-single-line = true format.quote-style = "single" [project.urls] From 8a4d7fa2b7230039a0dc61229c62cadc133a0869 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9=20=D0=91=D0=BB?= =?UTF-8?q?=D0=B8=D0=BD=D0=BE=D0=B2?= Date: Fri, 26 Jun 2026 17:47:43 +0300 Subject: [PATCH 06/10] Set isort to allow multi-line imports --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9e3ef56..0c7a875 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -66,7 +66,7 @@ testpaths = ["tests/documentation", "tests/typing", "tests/units"] lint.ignore = ['E501', 'E712', 'PTH123', 'PTH118', 'PLR2004', 'PTH107', 'SIM105', 'SIM102', 'RET503', 'PLR0912', 'C901', 'E731', 'F821'] lint.select = ["ERA001", "YTT", "ASYNC", "BLE", "B", "A", "COM", "INP", "PIE", "T20", "PT", "RSE", "RET", "SIM", "SLOT", "TID252", "ARG", "PTH", "I", "C90", "N", "E", "W", "D201", "D202", "D419", "F", "PL", "PLE", "PLR", "PLW", "RUF", "TRY201", "TRY400", "TRY401"] lint.isort.combine-as-imports = true -lint.isort.force-single-line = true +lint.isort.force-single-line = false format.quote-style = "single" [project.urls] From 68cf6a90fa9bcfdb3188185372a590d56ece6bbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9=20=D0=91=D0=BB?= =?UTF-8?q?=D0=B8=D0=BD=D0=BE=D0=B2?= Date: Fri, 26 Jun 2026 17:48:01 +0300 Subject: [PATCH 07/10] Fix import in test_process_waiting.py --- tests/units/test_process_waiting.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/units/test_process_waiting.py b/tests/units/test_process_waiting.py index b07c650..8489892 100644 --- a/tests/units/test_process_waiting.py +++ b/tests/units/test_process_waiting.py @@ -15,10 +15,7 @@ from cantok import ConditionToken, SimpleToken, TimeoutCancellationError from suby import process_waiting, run -from suby.process_waiting import ( - has_event_driven_wait, - wait_for_process_exit, -) +from suby.process_waiting import has_event_driven_wait, wait_for_process_exit from suby.subprocess_result import SubprocessResult _run_module = importlib.import_module('suby.run') From 0a2a6eff2804060866e1fed0c2f26d82f0642b54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9=20=D0=91=D0=BB?= =?UTF-8?q?=D0=B8=D0=BD=D0=BE=D0=B2?= Date: Fri, 26 Jun 2026 19:20:49 +0300 Subject: [PATCH 08/10] Rename coverage startup file from suby_coverage_process_startup.pth to coverage_process_startup.pth --- .github/workflows/tests_and_coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests_and_coverage.yml b/.github/workflows/tests_and_coverage.yml index b8b8bac..685a3f8 100644 --- a/.github/workflows/tests_and_coverage.yml +++ b/.github/workflows/tests_and_coverage.yml @@ -44,7 +44,7 @@ jobs: - name: Run tests and show the branch coverage on the command line shell: bash run: | - pth_file="$(python -c 'import sysconfig; print(sysconfig.get_path("purelib"))')/suby_coverage_process_startup.pth" + pth_file="$(python -c 'import sysconfig; print(sysconfig.get_path("purelib"))')/coverage_process_startup.pth" printf "import os; os.getenv('COVERAGE_PROCESS_START') and __import__('coverage').process_startup()\n" > "$pth_file" coverage erase COVERAGE_PROCESS_START="$PWD/pyproject.toml" coverage run -m pytest -n auto --cache-clear --assert=plain From d291140425fe462c7e1c37ee0f1df5e25e543075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9=20=D0=91=D0=BB?= =?UTF-8?q?=D0=B8=D0=BD=D0=BE=D0=B2?= Date: Fri, 26 Jun 2026 19:21:01 +0300 Subject: [PATCH 09/10] Bump cantok to 0.0.38 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0c7a875..7aa4be2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,7 @@ readme = "README.md" requires-python = ">=3.8" dependencies = [ 'emptylog>=0.0.12', - 'cantok>=0.0.36', + 'cantok>=0.0.38', 'microbenchmark>=0.0.3', 'sigmatch>=0.0.10', ] From a41eba14127a344ded5ef67515e441eaf63dec50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9=20=D0=91=D0=BB?= =?UTF-8?q?=D0=B8=D0=BD=D0=BE=D0=B2?= Date: Fri, 26 Jun 2026 19:50:07 +0300 Subject: [PATCH 10/10] Update workflow and project config to use single quotes consistently --- .github/workflows/benchmarks.yml | 2 +- pyproject.toml | 34 ++++++++++++++++---------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index f55cc9e..a2cc56c 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -3,7 +3,7 @@ name: Benchmarks on: push: branches: - - "main" + - 'main' pull_request: workflow_dispatch: diff --git a/pyproject.toml b/pyproject.toml index 7aa4be2..b7da870 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,16 +1,16 @@ [build-system] -requires = ["flit_core==3.12.0"] -build-backend = "flit_core.buildapi" +requires = ['flit_core==3.12.0'] +build-backend = 'flit_core.buildapi' [project] -name = "suby" -version = "0.0.11" +name = 'suby' +version = '0.0.11' authors = [ - { name="Evgeniy Blinov", email="zheni-b@yandex.ru" }, + { name='Evgeniy Blinov', email='zheni-b@yandex.ru' }, ] description = 'Slightly simplified subprocesses' -readme = "README.md" -requires-python = ">=3.8" +readme = 'README.md' +requires-python = '>=3.8' dependencies = [ 'emptylog>=0.0.12', 'cantok>=0.0.38', @@ -18,7 +18,7 @@ dependencies = [ 'sigmatch>=0.0.10', ] classifiers = [ - "Operating System :: OS Independent", + 'Operating System :: OS Independent', 'Operating System :: MacOS :: MacOS X', 'Operating System :: Microsoft :: Windows', 'Operating System :: POSIX', @@ -46,28 +46,28 @@ keywords = [ ] [tool.mutmut] -paths_to_mutate=["suby"] +paths_to_mutate=['suby'] [tool.coverage.run] branch = true parallel = true -plugins = ["coverage_pyver_pragma"] -source = ["suby"] +plugins = ['coverage_pyver_pragma'] +source = ['suby'] [tool.pytest.ini_options] -addopts = "-m 'not slow'" +addopts = '-m "not slow"' markers = [ - "slow: tests that create isolated environments, install dependencies, or otherwise take noticeably longer", + 'slow: tests that create isolated environments, install dependencies, or otherwise take noticeably longer', ] -norecursedirs = ["build", "mutants"] -testpaths = ["tests/documentation", "tests/typing", "tests/units"] +norecursedirs = ['build', 'mutants'] +testpaths = ['tests/documentation', 'tests/typing', 'tests/units'] [tool.ruff] lint.ignore = ['E501', 'E712', 'PTH123', 'PTH118', 'PLR2004', 'PTH107', 'SIM105', 'SIM102', 'RET503', 'PLR0912', 'C901', 'E731', 'F821'] -lint.select = ["ERA001", "YTT", "ASYNC", "BLE", "B", "A", "COM", "INP", "PIE", "T20", "PT", "RSE", "RET", "SIM", "SLOT", "TID252", "ARG", "PTH", "I", "C90", "N", "E", "W", "D201", "D202", "D419", "F", "PL", "PLE", "PLR", "PLW", "RUF", "TRY201", "TRY400", "TRY401"] +lint.select = ['ERA001', 'YTT', 'ASYNC', 'BLE', 'B', 'A', 'COM', 'INP', 'PIE', 'T20', 'PT', 'RSE', 'RET', 'SIM', 'SLOT', 'TID252', 'ARG', 'PTH', 'I', 'C90', 'N', 'E', 'W', 'D201', 'D202', 'D419', 'F', 'PL', 'PLE', 'PLR', 'PLW', 'RUF', 'TRY201', 'TRY400', 'TRY401'] lint.isort.combine-as-imports = true lint.isort.force-single-line = false -format.quote-style = "single" +format.quote-style = 'single' [project.urls] 'Source' = 'https://github.com/mutating/suby'