Repository navigation
Allow omitted image dimensions in TSX tilesets - #88
Open
civilwarinfrance wants to merge 1 commit into
Open
civilwarinfrance wants to merge 1 commit into
civilwarinfrance wants to merge 1 commit into
Conversation
AI-assisted by Codex (GPT-6).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TSX
<image>width and height are optional in Tiled's format reference, but both image-based tilesets and image-collection tiles currently index these attributes unconditionally. A valid image with either dimension omitted raisesKeyError.Read each dimension only when present, preserving the model's existing unknown-size defaults. This matches the JSON parser and keeps supplied dimensions and image references intact.
Regression coverage uses public
parse_tileset()across both formats, both tileset styles, and all four width/height presence combinations. On the original code, six TSX cases fail and ten controls pass; after the fix all 16 pass. Full suite: 142 passed, 96% coverage. Mypy passes all 27 source files; both changed files pass Black and the new test passes Ruff. Repository-wide lint/formatting findings match the original base (178 Ruff findings and six unrelated files needing Black). Tested on CPython 3.14/macOS ARM64.AI assistance: implemented and tested with OpenAI Codex (GPT-6).