pytest-dev / pytest-dev/pluggy

Get plugin corresponding to return values when calling hook

Open
#235 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Perhaps this is already possible, and I am just missing something, but is it possible to determine which plugin returned each value from a hook call? This would be valuable information for providing error messages and the like in situations where one and only one plugin should return a value under certain circumstances. Being able to report which plugins returned which values would be nice. Perhaps something like an alternative hook calling mechanism, which would return a dictionary (keyed on plugin namespace), rather than a list?

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-calling API and how plugin namespaces are represented. Define how a call would associate each returned value with its plugin, including the error-reporting use case, and verify that the proposed behavior fits the current plugin system.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.