Skip to content

add annotations to @proxies#3179

Merged
Zac-HD merged 1 commit intomasterfrom
proxies
Dec 10, 2021
Merged

add annotations to @proxies#3179
Zac-HD merged 1 commit intomasterfrom
proxies

Conversation

@rsokl
Copy link
Copy Markdown
Contributor

@rsokl rsokl commented Dec 4, 2021

The use of @proxies to help "share" strategies between hypothesis.extra.numpy and hypothesis.extra.array_api left some strategies with obfuscated signatures.

E.g. in VSCode:

image

This patch provides annotations for @proxies and thus remedies this:

image

@rsokl
Copy link
Copy Markdown
Contributor Author

rsokl commented Dec 4, 2021

@Zac-HD it looks like this is getting hairy. It seems like adding annotations to @proxies gets mypy to start caring about the internals of cached_strategy, and I am not sure how we will get the proper annotation for proxies to square with the usage in cacheable. Let me know if you have any insight/advice here. At this point, the only ideas I have are:

  • add more type: ignores
  • make a second version of proxies -- with annotations -- for use outside of cached_strategy (which would be pretty lame)

@Zac-HD Zac-HD enabled auto-merge December 10, 2021 13:38
@Zac-HD Zac-HD merged commit 8bcb914 into master Dec 10, 2021
@Zac-HD Zac-HD deleted the proxies branch December 10, 2021 14:20
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.

2 participants