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
13 changes: 5 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ 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.1",
"ty>=0.0.69",
"setuptools>=83.0.0",
"mypy>=2.3.0",
"cloudpickle", # 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 Expand Up @@ -150,27 +153,21 @@ select = [

[tool.poe.tasks.test]
cmd = "pytest $POE_EXTRA_ARGS"
executor = {type = "uv", isolated = true}

[tool.poe.tasks.lint]
cmd = "ruff check --fix --show-fixes"
executor = { type = "uv", isolated = true }

[tool.poe.tasks.lint-checkonly]
cmd = "ruff check"
executor = { type = "uv", isolated = true }

[tool.poe.tasks.ty]
cmd = "ty check"
executor = {type = "uv", isolated = true}

[tool.poe.tasks.pyright]
cmd = "pyright"
executor = {type = "uv", isolated = true}

[tool.poe.tasks.mypy]
cmd = "mypy tests construct_typed"
executor = {type = "uv", isolated = true}

[tool.poe.tasks.typecheck]
sequence = [
Expand Down
4 changes: 3 additions & 1 deletion tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,9 @@ 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)
# Hier gibt es mit ty 0.0.69 ein Problem: `common(Bitwise(Bytes(8)), ...)` kann nicht aufgelöst werden. So funktioniert es.
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