From a1f5eebdc1ade0dba539f6b58780d64df0eb9258 Mon Sep 17 00:00:00 2001 From: "d.kovalenko" Date: Wed, 25 Feb 2026 14:51:10 +0300 Subject: [PATCH 1/3] A ruff-problems are fixed --- src/local_ops.py | 2 +- src/remote_ops.py | 2 +- tests/test_os_ops_common.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/local_ops.py b/src/local_ops.py index 0664ab1..2ae2355 100644 --- a/src/local_ops.py +++ b/src/local_ops.py @@ -198,7 +198,7 @@ def _run_command__generic( cwd=cwd, **extParams ) - assert not (process is None) + assert process is not None if get_process: return process, None, None try: diff --git a/src/remote_ops.py b/src/remote_ops.py index 727833d..0821870 100644 --- a/src/remote_ops.py +++ b/src/remote_ops.py @@ -140,7 +140,7 @@ def exec_command( ssh_cmd = ['ssh', self.ssh_dest] + self.ssh_args + [cmdline] process = subprocess.Popen(ssh_cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - assert not (process is None) + assert process is not None if get_process: return process diff --git a/tests/test_os_ops_common.py b/tests/test_os_ops_common.py index fb6c3a6..e4b8278 100644 --- a/tests/test_os_ops_common.py +++ b/tests/test_os_ops_common.py @@ -1014,7 +1014,7 @@ def LOG_INFO(template: str, *args) -> None: LOG_INFO("HELLO! I am here!") for num in range(cNumbers): - assert not (num in reservedNumbers) + assert num not in reservedNumbers file_path = MAKE_PATH(lock_dir, num) @@ -1150,7 +1150,7 @@ class tadWorkerData: logging.info("OK. Let's check reservedNumbers!") for n in range(N_NUMBERS): - if not (n in reservedNumbers.keys()): + if n not in reservedNumbers.keys(): nErrors += 1 logging.error("Number {} is not reserved!".format(n)) continue From 56ef69d20555d01ac1a2cb2a5e9c020e97efc26e Mon Sep 17 00:00:00 2001 From: "d.kovalenko" Date: Wed, 25 Feb 2026 14:52:42 +0300 Subject: [PATCH 2/3] LocalOperations: a call of subprocess.Popen is fixed (typing.Dict[str, typing.Any]) --- src/local_ops.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/local_ops.py b/src/local_ops.py index 2ae2355..ebc1591 100644 --- a/src/local_ops.py +++ b/src/local_ops.py @@ -107,7 +107,7 @@ def _run_command__nt( # TODO: why don't we use the data from input? - extParams: typing.Dict[str, str] = dict() + extParams: typing.Dict[str, typing.Any] = dict() if exec_env is None: pass @@ -166,7 +166,7 @@ def _run_command__generic( assert input_prepared is None or type(input_prepared) is bytes - extParams: typing.Dict[str, str] = dict() + extParams: typing.Dict[str, typing.Any] = dict() if exec_env is None: pass From cd5d9ebb6c87fe9fbe0e85aedb1c33ea3847d059 Mon Sep 17 00:00:00 2001 From: "d.kovalenko" Date: Wed, 25 Feb 2026 14:54:09 +0300 Subject: [PATCH 3/3] CI: Verification with ruff is added --- .github/workflows/package-verification.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/package-verification.yml b/.github/workflows/package-verification.yml index 918c81c..a7865bd 100644 --- a/.github/workflows/package-verification.yml +++ b/.github/workflows/package-verification.yml @@ -27,10 +27,13 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install flake8 flake8-pyproject + python -m pip install flake8 flake8-pyproject ruff - name: Lint with flake8 run: | flake8 . + - name: Lint with ruff + run: | + ruff check . test: runs-on: ubuntu-latest