Skip to content

Search values in generic mappings with includes - #458

Merged
dgilland merged 2 commits into
dgilland:developfrom
Gambit-Checkmate:fix/includes-generic-mappings
Nov 15, 2026
Merged

dgilland merged 2 commits into
dgilland:developfrom
Gambit-Checkmate:fix/includes-generic-mappings

Conversation

@Gambit-Checkmate

Copy link
Copy Markdown
Contributor

Fixes #457. includes raises KeyError on UserDict and MappingProxyType because it tries to slice them like sequences. Recognize all mappings and reuse the dictionary value search, including positive and negative offsets. Update the public and generated chain annotations.

Sixteen mapping regressions fail on develop and pass after the change. The full suite passed on Python 3.13.13 (3,341 tests, 100% coverage), with targeted checks on Linux 3.10 and Windows 3.11, 3.12 and 3.14. The configured mypy check and direct/chain consumer type probe passed, along with lint, docs and builds.

OpenAI Codex (GPT-6 based) assisted with investigation, implementation, testing and drafting.

@coveralls

coveralls commented Nov 14, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 100.0%. remained the same — Gambit-Checkmate:fix/includes-generic-mappings into dgilland:develop

@dgilland
dgilland merged commit 00bd926 into dgilland:develop Nov 15, 2026
5 checks passed
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.

includes raises KeyError for generic mappings

3 participants