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

Make CrossHair aware of typing stubs #46

Open
pschanely opened this issue Jan 27, 2021 · 1 comment
Open

Make CrossHair aware of typing stubs #46

pschanely opened this issue Jan 27, 2021 · 1 comment

Comments

@pschanely
Copy link
Owner

Right now, CrossHair can only effectively create symbolic class instances when types are present on the implementation. It would be great if CrossHair could understand .pyi typing stubs and use those when appropriate.

Understanding @overload would have added benefits: we could avoid reporting reporting counterexamples that don't fit one of the given combination of types.

@pschanely
Copy link
Owner Author

An update: there is now some (pretty experimental) stub parsing code in place. This is only used by register_contract at the moment, but we could try using it for creating class instances and see what happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant