From e8491be5f6a89f55bcaa75f14fa58dd5ba682357 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 25 May 2026 20:36:58 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v5.0.0 → v6.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v5.0.0...v6.0.0) - [github.com/asottile/setup-cfg-fmt: v2.7.0 → v3.2.0](https://github.com/asottile/setup-cfg-fmt/compare/v2.7.0...v3.2.0) - [github.com/PyCQA/autoflake: v2.3.1 → v2.3.3](https://github.com/PyCQA/autoflake/compare/v2.3.1...v2.3.3) - https://github.com/psf/black → https://github.com/psf/black-pre-commit-mirror - [github.com/psf/black-pre-commit-mirror: 24.10.0 → 26.5.1](https://github.com/psf/black-pre-commit-mirror/compare/24.10.0...26.5.1) - [github.com/PyCQA/flake8: 7.1.1 → 7.3.0](https://github.com/PyCQA/flake8/compare/7.1.1...7.3.0) - [github.com/asottile/pyupgrade: v3.18.0 → v3.21.2](https://github.com/asottile/pyupgrade/compare/v3.18.0...v3.21.2) - [github.com/asottile/reorder-python-imports: v3.14.0 → v3.16.0](https://github.com/asottile/reorder-python-imports/compare/v3.14.0...v3.16.0) - [github.com/pre-commit/mirrors-mypy: v1.12.1 → v2.1.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.12.1...v2.1.0) --- .pre-commit-config.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 458b08b..8d74c4a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -11,12 +11,12 @@ repos: - id: requirements-txt-fixer - repo: https://github.com/asottile/setup-cfg-fmt - rev: v2.7.0 + rev: v3.2.0 hooks: - id: setup-cfg-fmt - repo: https://github.com/PyCQA/autoflake - rev: v2.3.1 + rev: v2.3.3 hooks: - id: autoflake exclude: test/_mock_data @@ -28,21 +28,21 @@ repos: - --remove-duplicate-keys - --remove-unused-variables - - repo: https://github.com/psf/black - rev: 24.10.0 + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 26.5.1 hooks: - id: black args: [ --safe ] additional_dependencies: [ 'click==8.0.4' ] - repo: https://github.com/PyCQA/flake8 - rev: 7.1.1 + rev: 7.3.0 hooks: - id: flake8 language_version: python3 - repo: https://github.com/asottile/pyupgrade - rev: v3.18.0 + rev: v3.21.2 hooks: - id: pyupgrade exclude: ^test/ @@ -50,14 +50,14 @@ repos: - --py38-plus - repo: https://github.com/asottile/reorder-python-imports - rev: v3.14.0 + rev: v3.16.0 hooks: - id: reorder-python-imports exclude: ^(pre_commit/resources/|testing/resources/python3_hooks_repo/) args: [ --py38-plus, --add-import, 'from __future__ import annotations' ] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.12.1 + rev: v2.1.0 hooks: - id: mypy additional_dependencies: From c10fd1f749bf2008ac5a975d08a93cc080a3a2ca Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 25 May 2026 20:37:39 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- setup.cfg | 4 +--- src/femto/trench.py | 6 +++--- tests/pgm_compiler_test.py | 3 ++- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/setup.cfg b/setup.cfg index 0469d5f..2fe75ec 100644 --- a/setup.cfg +++ b/setup.cfg @@ -11,8 +11,6 @@ maintainer_email = albr.riccardo@gmail.com license = GPL-3.0 license_files = LICENSE classifiers = - License :: OSI Approved :: GNU General Public License v3 (GPLv3) - License :: OSI Approved :: GPLv3 License Programming Language :: Python :: 3 Programming Language :: Python :: 3 :: Only Programming Language :: Python :: Implementation :: CPython @@ -51,7 +49,7 @@ install_requires = toml>=0.10.2 tomli>=2.0.1 xlsxwriter>=3.0.3 -python_requires = >=3.9 +python_requires = >=3.10 include_package_data = true package_dir = = src diff --git a/src/femto/trench.py b/src/femto/trench.py index 9085ba7..b463f42 100644 --- a/src/femto/trench.py +++ b/src/femto/trench.py @@ -217,7 +217,7 @@ def wall_length(self) -> float: @cached_property def orientation(self) -> str: """Orientation of the trench block.""" - (xmin, ymin, xmax, ymax) = self.block.bounds + xmin, ymin, xmax, ymax = self.block.bounds if (xmax - xmin) <= (ymax - ymin): logger.debug('The block orientation is vertical.') return 'v' @@ -233,7 +233,7 @@ def num_insets(self) -> int: return self.safe_inner_turns else: # External rectangle - (xmin_ext, ymin_ext, xmax_ext, ymax_ext) = self.block.bounds + xmin_ext, ymin_ext, xmax_ext, ymax_ext = self.block.bounds # Internal rectangle buffer_length = 2 * self.delta_floor @@ -273,7 +273,7 @@ def zigzag_mask(self) -> geometry.MultiLineString: rectangle, which produces a point along with the usual lines). """ - (xmin, ymin, xmax, ymax) = self.block.bounds + xmin, ymin, xmax, ymax = self.block.bounds number_of_lines = 2 + int((xmax - xmin) / self.delta_floor) coords = [] diff --git a/tests/pgm_compiler_test.py b/tests/pgm_compiler_test.py index 29d12f2..1081cba 100644 --- a/tests/pgm_compiler_test.py +++ b/tests/pgm_compiler_test.py @@ -1036,13 +1036,14 @@ def test_programstop(param) -> None: assert G._instructions[-2] == 'PROGRAM 3 STOP\n' assert G._instructions[-1] == 'WAIT (TASKSTATUS(3, DATAITEM_TaskState) == TASKSTATE_Idle) -1\n' + def test_wait_default_time(param) -> None: G = PGMCompiler(**param) G.wait(condition='ciao') assert G._instructions[-1] == 'WAIT (ciao) -1\n' -@pytest.mark.parametrize('t', [0,1,2,3,4,69, 99, 420]) +@pytest.mark.parametrize('t', [0, 1, 2, 3, 4, 69, 99, 420]) def test_wait_time(param, t) -> None: G = PGMCompiler(**param) G.wait(condition='ciao', time=t)