Skip to content

Complete Py3 stub for sre_constants #1709

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

Merged
merged 1 commit into from
Nov 4, 2017
Merged

Conversation

Zac-HD
Copy link
Contributor

@Zac-HD Zac-HD commented Nov 2, 2017

The existing py3 stub for sre_constants is directly from stubgen, which misses the dynamically-defined constants. Fortunately, this is easy to add by hand!

Motivation: we need this stub filled out to typecheck Hypothesis' regex module, which generates strings matching the given regex (see HypothesisWorks/hypothesis#858). We currently silence the many 'module has no attribute' errors by casting the module to Any, but obviously this isn't ideal.

Also relevant to #1019, by checking off one of the remaining modules.

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