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

Replace typing.re import #2788

Merged
merged 3 commits into from
Jun 20, 2022
Merged

Replace typing.re import #2788

merged 3 commits into from
Jun 20, 2022

Conversation

srittau
Copy link
Contributor

@srittau srittau commented May 18, 2022

typing.re has been deprecated since Python 3.8 and will be removed in Python 3.12.
Pattern is also available in the top-level typing namespace.

`typing.re` has been deprecated since Python 3.8 and will be removed in Python 3.12.
`Pattern` is also available in the top-level `typing` namespace.
@ktbyers
Copy link
Owner

ktbyers commented May 18, 2022

@srittau The change is failing the mypy check (see errors above).

@srittau
Copy link
Contributor Author

srittau commented May 18, 2022

The reason for that is that typing.re was never known to type checkers as it's not part of typeshed. (This is not flagged due to --ignore-missing-imports being passed to mypy.) Therefore, Pattern was Any before. Anyway, I added a type argument, could you verify that str is correct?

@ktbyers
Copy link
Owner

ktbyers commented May 18, 2022

mypy in ci-cd is still broken.

@srittau
Copy link
Contributor Author

srittau commented May 18, 2022

I added a # type: ignore like in the line above.

@ktbyers ktbyers merged commit 636f991 into ktbyers:develop Jun 20, 2022
@ktbyers
Copy link
Owner

ktbyers commented Jun 20, 2022

I am going to back this change out as it is still breaking CI-CD.

ktbyers added a commit that referenced this pull request Jun 20, 2022
@srittau srittau deleted the patch-1 branch June 21, 2022 05:47
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