Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optionally inject Request to exemplars function. #92

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

backbord
Copy link
Contributor

@backbord backbord commented Feb 5, 2024

Inspect the exemplars function and pass the Request object, if a parameter with type annotation Request exists OR if no such parameter exists but one with the name "request".

Fixes #90

Inspect the exemplars function and pass the Request object,
if a parameter with type annotation Request exists OR
if no such parameter exists but one with the name "request".

Fixes stephenhillier#90
@stephenhillier
Copy link
Owner

This is great. Does the annotation attribute require a minimum Python version? The tests seem to cover all the cases I can think of and they are passing under 3.8, so I think we're good.

@stephenhillier
Copy link
Owner

I should have got this in before I cut a release this morning, but I will try to do another one tonight or within the next few days.

@stephenhillier stephenhillier merged commit b52063c into stephenhillier:master Feb 6, 2024
7 checks passed
@backbord
Copy link
Contributor Author

backbord commented Feb 6, 2024

Cool! Thanks!

AFAIK, the signature() function together with the Parameter class with it's annotation attribute are available since Python 3.3:

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.

Exemplar with data from header?
2 participants