pytest-dev / pytest-dev/pluggy

hook call controller in hook specs

Open
#361 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

discussion enhancement
Dominant language
Python
Stars
1.7k
Forks
160
Avg merge
21h 4m
Merged PRs (30d)
6

Description

currently hook specs just provide the parameters

if it was allowed to have them provide more details, this could be a win

a very initial draft is something like

python

@hookspec
def pytest_something_with_paths(call_config: HookCallConfig, path: Path | None = None, oldpath: py.path.local |None = None ) -> ...
   if path is None and old_path is None:
    rasie TypeError(...)

   return call_config.set_parameters(....)  

i'd love to bikeshed apis a bit

its also a possible replacement to #151

cc @goodboy @nicoddemus @bluetech

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing hook specifications and the HookCallConfig example in the issue, then compare the proposed direction with issue #151. The work is complete when the hook-spec API is agreed, its parameter-validation and modification behavior is specified, and the resulting behavior is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.