Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -28,36 +28,36 @@ 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/
args:
- --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:
Expand Down
4 changes: 1 addition & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/femto/trench.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down Expand Up @@ -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 = []
Expand Down
3 changes: 2 additions & 1 deletion tests/pgm_compiler_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading