Skip to content
Merged
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
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [0.2.0] - 2026-06-09
- bumped minimum required Python version to 3.10 (previousl: 3.8 which has reached end-of-life)
- updated `typing_extensions` dependency to >=4.12.0 for Python 3.13 compatibility
- removed `version.py`, use `importlib.metadata` instead to get the version number

-------------------------------------------------------------------------------

## [0.1.5] - 2023-07-24
- updated construct-typing dependency to v0.6.*

Expand Down Expand Up @@ -53,7 +60,7 @@ Enhanced HexEditor:
-------------------------------------------------------------------------------
## [0.0.19] - 2022-09-07
Enhanced ConstructHexEditor:
- Fixed a bug which leads to an "Fatal Python error" as of wxPython 4.2.
- Fixed a bug which leads to "Fatal Python error" as of wxPython 4.2.

-------------------------------------------------------------------------------
## [0.0.18] - 2022-09-07
Expand Down Expand Up @@ -194,4 +201,4 @@ Enhanced HexEditor:

-------------------------------------------------------------------------------
## [0.0.1] - 2021-04-05
Initial Version
Initial Version
2 changes: 1 addition & 1 deletion construct_editor/core/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def __init__(self):

def append(self, callback: Callable[P, None]):
"""
Add new callback function to the list (ignroe duplicates)
Add new callback function to the list (ignore duplicates)
"""
if callback not in self._callbacks:
self._callbacks.append(callback)
Expand Down
2 changes: 1 addition & 1 deletion construct_editor/core/construct_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import construct_editor.core.entries as entries
from construct_editor.core.callbacks import CallbackList
from construct_editor.core.model import ConstructEditorColumn, ConstructEditorModel
from construct_editor.core.model import ConstructEditorModel
from construct_editor.core.preprocessor import include_metadata


Expand Down
1 change: 0 additions & 1 deletion construct_editor/core/entries.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
import dataclasses
import enum
import io
import string
import typing as t
Expand Down
1 change: 0 additions & 1 deletion construct_editor/gallery/example_cmd_resp.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import dataclasses
import typing as t
from . import GalleryItem
import copy


class DefaultSizedError(cs.ConstructError):
Expand Down
3 changes: 0 additions & 3 deletions construct_editor/gallery/test_bits_swapped_bitwise.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import construct as cs
import construct_typed as cst
import dataclasses
import typing as t
from . import GalleryItem


Expand Down
3 changes: 0 additions & 3 deletions construct_editor/gallery/test_bitwise.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import construct as cs
import construct_typed as cst
import dataclasses
import typing as t
from . import GalleryItem


Expand Down
1 change: 0 additions & 1 deletion construct_editor/gallery/test_computed.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import construct as cs
import construct_typed as cst
import dataclasses
import typing as t
from . import GalleryItem


Expand Down
1 change: 0 additions & 1 deletion construct_editor/gallery/test_const.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import construct as cs
import construct_typed as cst
import dataclasses
import typing as t
from . import GalleryItem


Expand Down
3 changes: 0 additions & 3 deletions construct_editor/gallery/test_enum.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import construct as cs
import construct_typed as cst
import dataclasses
import typing as t
from . import GalleryItem


Expand Down
3 changes: 0 additions & 3 deletions construct_editor/gallery/test_flagsenum.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import construct as cs
import construct_typed as cst
import dataclasses
import typing as t
from . import GalleryItem


Expand Down
1 change: 0 additions & 1 deletion construct_editor/gallery/test_greedyrange.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import construct as cs
import construct_typed as cst
import dataclasses
import typing as t
from . import GalleryItem


Expand Down
1 change: 0 additions & 1 deletion construct_editor/gallery/test_padded_string.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import construct as cs
import construct_typed as cst
import dataclasses
import typing as t
from . import GalleryItem


Expand Down
3 changes: 0 additions & 3 deletions construct_editor/gallery/test_pointer_peek_seek_tell.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import construct as cs
import construct_typed as cst
import dataclasses
import typing as t
from . import GalleryItem


Expand Down
1 change: 0 additions & 1 deletion construct_editor/gallery/test_renamed.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import construct as cs
import construct_typed as cst
import dataclasses
import typing as t
from . import GalleryItem


Expand Down
3 changes: 0 additions & 3 deletions construct_editor/gallery/test_switch.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import construct as cs
import construct_typed as cst
import dataclasses
import typing as t
from . import GalleryItem


Expand Down
1 change: 0 additions & 1 deletion construct_editor/gallery/test_tenum.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import construct as cs
import construct_typed as cst
import dataclasses
import typing as t
from . import GalleryItem


Expand Down
1 change: 0 additions & 1 deletion construct_editor/gallery/test_tflagsenum.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import construct as cs
import construct_typed as cst
import dataclasses
import typing as t
from . import GalleryItem


Expand Down
1 change: 0 additions & 1 deletion construct_editor/gallery/test_timestamp.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import construct as cs
import construct_typed as cst
import dataclasses
import typing as t
import arrow
from . import GalleryItem

Expand Down
2 changes: 0 additions & 2 deletions construct_editor/version.py

This file was deleted.

2 changes: 1 addition & 1 deletion construct_editor/wx_widgets/wx_construct_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import wx.dataview as dv

from construct_editor.core.construct_editor import ConstructEditor
from construct_editor.core.entries import EntryConstruct, EntryFlag
from construct_editor.core.entries import EntryConstruct
from construct_editor.core.model import ConstructEditorColumn, ConstructEditorModel
from construct_editor.wx_widgets.wx_context_menu import WxContextMenu
from construct_editor.wx_widgets.wx_obj_view import (
Expand Down
2 changes: 0 additions & 2 deletions construct_editor/wx_widgets/wx_hex_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

import wx
import wx.grid as Grid
import wx.lib.newevent
import wx.stc

from construct_editor.core.callbacks import CallbackList

Expand Down
1 change: 0 additions & 1 deletion construct_editor/wx_widgets/wx_obj_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
FlagsEnumItem,
ObjViewSettings,
ObjViewSettings_Bytes,
ObjViewSettings_Default,
ObjViewSettings_Enum,
ObjViewSettings_Flag,
ObjViewSettings_FlagsEnum,
Expand Down
176 changes: 176 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
[build-system]
requires = ["setuptools>=82.0.1", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "construct-editor"
version = "0.2.0"
description = "GUI (based on wxPython) for 'construct', which is a powerful declarative and symmetrical parser and builder for binary data."
readme = "README.md"
license = "MIT"
authors = [{ name = "Tim Riddermann" }]
requires-python = ">=3.10"
keywords = [
"gui",
"wx",
"wxpython",
"widget",
"binary",
"editor",
"construct",
"kaitai",
"declarative",
"data structure",
"struct",
"symmetric",
"parser",
"builder",
"parsing",
"building",
"pack",
"unpack",
"packer",
"unpacker",
"bitstring",
"bytestring",
"bitstruct",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Implementation :: CPython",
"Typing :: Typed",
]
dependencies = [
"arrow>=1.0.0",
"construct>=2.10.68",
"construct-typing==0.7.*",
"typing-extensions>=4.12.0",
"wrapt>=1.14.0",
"wxPython>=4.2.2",
]

[project.urls]
Homepage = "https://github.com/timrid/construct-editor"

[project.gui-scripts]
construct-editor = "construct_editor.main:main"

[dependency-groups]
dev = [
"poethepoet>=0.46.0",
"pyright>=1.1.410",
"ruff>=0.15.16",
"ty>=0.0.46",
"cryptography", # optional "extra" from construct that the user may or may not have installed
"cloudpickle", # 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
"numpy>=1.20.0", # optional "extra" from construct that the user may or may not have installed
"ruamel.yaml", # optional "extra" from construct that the user may or may not have installed
]

[tool.setuptools.packages.find]
include = [
"construct_editor",
"construct_editor.core",
"construct_editor.gallery",
"construct_editor.wx_widgets",
]

[tool.setuptools.package-data]
construct_editor = ["py.typed"]

[tool.pyright]
typeCheckingMode = "strict"
exclude = [
"**/node_modules",
"**/__pycache__",
"**/.*",
".history",
".venv",
".venv*",
"build",
"dist",
"libs",
]

# These warnings should be activated as "error" in the future, but for now we don't want to refactor the entire codebase right now.
# Valid values: "error", "warning", "information", "none"
reportArgumentType = "none"
reportAttributeAccessIssue = "none"
reportGeneralTypeIssues = "none"
reportIncompatibleMethodOverride = "none"
reportInvalidTypeArguments = "none"
reportMissingParameterType = "none"
reportMissingTypeArgument = "none"
reportMissingTypeStubs = "none"
reportOptionalMemberAccess = "none"
reportUnknownArgumentType = "none"
reportUnknownLambdaType = "none"
reportUnknownMemberType = "none"
reportUnknownParameterType = "none"
reportUnknownVariableType = "none"
reportUnnecessaryComparison = "none"
reportUnusedVariable = "none"
# These "unnecessary isinstance" checks often enhance readability or increase the future-proofness of the code,
# since you can then explicitly "raise" for other types. So we don't want to complain about them.
reportUnnecessaryIsInstance = "none"

[tool.ty.src]
exclude = [
"**/node_modules",
"**/__pycache__",
"**/.*",
".history",
".venv",
".venv*",
"build",
"dist",
"libs",
]

# These warnings should be activated as "error" in the future, but for now we don't want to refactor the entire codebase right now.
# Valid values: "error", "warn", "ignore"
[tool.ty.rules]
invalid-assignment = "ignore"
invalid-method-override = "ignore"
invalid-type-arguments = "ignore"
unresolved-attribute = "ignore"
unused-type-ignore-comment = "ignore"

[tool.ty.terminal]
error-on-warning = true
output-format = "concise" # "full" | "concise" | "github" | "gitlab" | "junit"

[tool.ruff]
line-length = 140
indent-width = 4
output-format = "concise" # "full" | "concise" | "grouped" | "json" | "junit" | "github" | "gitlab" | "pylint" | "azure"

[tool.ruff.lint]
allowed-confusables = ["×", "–", "‘", "’"]

# select = [] Use Default ruleset, cp. https://docs.astral.sh/ruff/rules/

# These warnings should be activated as "error" in the future, but for now we don't want to refactor the entire codebase right now.
ignore = [
"E402", # Module level import not at top of file
"E711", # Comparison to `None` should be `cond is None`
"E712", # Avoid equality comparisons to `True`
"F403", # `from ... import *` used; unable to detect undefined names
"F405", # `...` may be undefined, or defined from star imports
"F841", # Local variable `...` is assigned to but never used
]

[tool.poe.tasks.typecheck]
sequence = [
{ cmd = "ruff check --fix --show-fixes" },
{ cmd = "ty check" },
{ cmd = "pyright" },
]
executor = {type = "uv", isolated = true}
8 changes: 0 additions & 8 deletions pyrightconfig.json

This file was deleted.

Loading