Skip to content

feat(config): replace TypedDict options with Hook*Configuration#704

Draft
RonnyPfannschmidt wants to merge 3 commits into
pytest-dev:mainfrom
RonnyPfannschmidt:refactor/configuration-objects
Draft

feat(config): replace TypedDict options with Hook*Configuration#704
RonnyPfannschmidt wants to merge 3 commits into
pytest-dev:mainfrom
RonnyPfannschmidt:refactor/configuration-objects

Conversation

@RonnyPfannschmidt

Copy link
Copy Markdown
Member

Summary

  • Replace live TypedDict hook options with HookspecConfiguration / HookimplConfiguration
  • Markers attach configuration objects; registration uses private discovery
  • parse_hook*_opts remains a deprecated pytest/support concession (dict return), only called when overridden and no modern config is present

Review

Incremental review against the module-split parent (preferred):
RonnyPfannschmidt#5

This upstream PR targets main and includes the module reorganization commit as well.

Test plan

  • uv run pytest
  • uv run pre-commit run -a
  • CI green
  • Changelog fragment once this PR number is known

Made with Cursor

RonnyPfannschmidt and others added 3 commits July 22, 2026 12:24
Move hook types, markers, callers, implementations, and multicall out of
the monolithic _hooks/_callers modules so later typed-config and
CompletionHook work can land without thrashing one huge file. Keep
_hooks and _callers as re-export shims for import compatibility.

Co-authored-by: Cursor AI <ai@cursor.sh>
Co-authored-by: Cursor Grok 4.5 <grok@cursor.com>
Markers attach HookspecConfiguration/HookimplConfiguration objects.
Registration discovers those privately; parse_hookimpl_opts and
parse_hookspec_opts remain a deprecated pytest concession that returns
legacy dicts and is only called when a subclass overrides them and no
modern configuration attribute was found.

Co-authored-by: Cursor AI <ai@cursor.sh>
Co-authored-by: Cursor Grok 4.5 <grok@cursor.com>
Co-authored-by: Cursor AI <ai@cursor.sh>
Co-authored-by: Cursor Grok 4.5 <grok@cursor.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