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
9 changes: 6 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ dev = [
"pyright>=1.1.411",
"pytest>=9.1.1",
"pytest-cov>=7.1.0",
"ruff>=0.15.21",
"ty>=0.0.59",
"ruff>=0.16.3",
"ty>=0.0.73",
"setuptools>=83.0.0",
"mypy>=2.3.0",
"mypy>=2.3.1",
"cloudpickle", # optional "extra" from construct that the user may or may not have installed
"cryptography", # optional "extra" from construct that the user may or may not have installed
"lz4", # optional "extra" from construct that the user may or may not have installed
Expand All @@ -86,6 +86,9 @@ packages=[
]

[tool.uv]
# Use a 1 week cooldown phase to prevent potential supply chain attacks.
# See for example: https://blog.yossarian.net/2025/11/21/We-should-all-be-using-dependency-cooldowns
exclude-newer = "1w"
# mypy will only find the stubs from "construct-stubs" when using "compat" mode during development.
config-settings = { editable_mode = "compat" }

Expand Down
5 changes: 4 additions & 1 deletion tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,10 @@ def test_bytes_issue_827() -> None:


def test_bitwise() -> None:
common(Bitwise(Bytes(8)), b"\xff", b"\x01\x01\x01\x01\x01\x01\x01\x01", 1)
# There's a problem in `ty` (confirmed in 0.0.73) : inlining `bitwise` (ie. writing `common(Bitwise(Bytes(8)), ...)`) leads to:
# "error[no-matching-overload] No overload of function `common` matches arguments"
bitwise = Bitwise(Bytes(8))
common(bitwise, b"\xff", b"\x01\x01\x01\x01\x01\x01\x01\x01", 1)
common(Bitwise(Array(8, Bit)), b"\xff", [1, 1, 1, 1, 1, 1, 1, 1], 1)
common(Bitwise(Array(2, Nibble)), b"\xff", [15, 15], 1)
common(Bitwise(Array(1, Octet)), b"\xff", [255], 1)
Expand Down
Loading
Loading