Skip to content

Add complete bundled type stubs - #201

Open
heejaechang wants to merge 2 commits into
inveniosoftware:masterfrom
heejaechang:heejaechang-complete-bundled-stubs
Open

Add complete bundled type stubs#201
heejaechang wants to merge 2 commits into
inveniosoftware:masterfrom
heejaechang:heejaechang-complete-bundled-stubs

Conversation

@heejaechang

Copy link
Copy Markdown

Summary

  • ship complete sidecar stubs for all eight dictdiffer modules
  • model literal-tagged add/remove/change records, generic patch/revert returns, lookup overloads, merge/conflict state, and optional NumPy behavior without Any or suppressions
  • add the PEP 561 py.typed marker; runtime implementation files are unchanged

Type completeness

An installed marker-only master build scored 20.69% under unfiltered VerifyTypes (18 known / 4 ambiguous / 65 unknown). The installed candidate wheel scores 100% (97 known / 0 ambiguous / 0 unknown); the additional known symbols are existing package-internal runtime reexports represented explicitly by the stubs.

Validation

  • pyright --verifytypes dictdiffer --outputjson (unfiltered): 100%, 0 diagnostics
  • python -m mypy.stubtest dictdiffer: success with no allowlist
  • strict positive consumers: Pyright and mypy success
  • meaningful negative consumers: Pyright 6 diagnostics and mypy 5 errors for invalid actions, payloads, lookups, and conflict picks
  • AST/runtime surface comparison: all 8 modules, declarations, methods, fields, signatures/default presence, and package reexports match
  • repository tasks: Sphinx HTML, 126 pytest checks with 100% coverage, Sphinx doctest, and pycodestyle all pass
  • python -m tox: matches master's no-config default environment and successfully builds/installs the package
  • wheel and sdist build successfully and pass twine check; both contain all 8 .pyi files plus py.typed
  • installed-wheel runtime parity passes for diff/patch/swap/revert, nested mappings/lists/sets, merge conflicts, deepcopy/pickle behavior, and both NumPy-present and NumPy-absent environments
  • final typing artifacts contain no Any, casts, ignores, noqa, checker disables, or allowlists

Baseline limitation

On this Windows checkout, the exact ./run-tests.sh wrapper fails on both master and this branch before running tasks because Git Bash sees CRLF control characters and cannot resolve the Windows Python commands. The four commands from that wrapper were therefore also executed directly in the same environment and all pass as listed above.

heejaechang and others added 2 commits July 27, 2026 17:17
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Model PathLimit's recursive trie and expose assert_no_diff with the same parameters as diff.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.

1 participant