Skip to content

fix(adapters): reverse mapping views without list conversion - #1652

Closed
harshit-3355 wants to merge 7 commits into
bluesky:mainfrom
harshit-3355:fix/809-reverse-generic-mapping-items
Closed

harshit-3355 wants to merge 7 commits into
bluesky:mainfrom
harshit-3355:fix/809-reverse-generic-mapping-items

Conversation

@harshit-3355

Copy link
Copy Markdown

Summary

Use built-in reverse iteration for mapping items without first materializing an intermediate list. Normalize generic mapping views so one-shot cached views remain supported, and add a regression test for that behavior. Includes the required Unreleased changelog entry.

Closes #809

Verification

  • python -m pytest -q tests/adapters/test_mapping.py passes.
  • ruff check tiled/adapters/mapping.py tests/adapters/test_mapping.py passes.
  • git diff --check passes.

Checklist

  • Add a changelog entry.
  • Include the issue this PR closes.

@codecov

codecov Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.97%. Comparing base (d167166) to head (57722aa).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1652      +/-   ##
==========================================
- Coverage   80.97%   80.97%   -0.01%     
==========================================
  Files         198      198              
  Lines       20688    20692       +4     
==========================================
+ Hits        16753    16755       +2     
- Misses       3935     3937       +2     
Files with missing lines Coverage Δ
tiled/adapters/mapping.py 94.24% <100.00%> (+0.08%) ⬆️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@harshit3355

Copy link
Copy Markdown

I have moved this contribution to my primary GitHub account, harshit3355, in #1656. Please close #1652 in favor of the replacement so review can continue under the correct account.

1 similar comment
@harshit3355

Copy link
Copy Markdown

I have moved this contribution to my primary GitHub account, harshit3355, in #1656. Please close #1652 in favor of the replacement so review can continue under the correct account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor to use dict reversal

3 participants