Skip to content

[mypyc] Use mypy.FORMAT_RE and ConversionSpecifier for % interpolation #10877

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 22 commits into from
Jul 29, 2021

Conversation

97littleleaf11
Copy link
Collaborator

Description

mypy.checkstrformat offers regex and ConversionSpecifier for tokenizer, thus this PR:

  • deletes the redundant code
  • uses ConversionSpecifier as FormatOp

@97littleleaf11
Copy link
Collaborator Author

97littleleaf11 commented Jul 27, 2021

The failure is caused by m.group. #9611 (comment). We can quickly fix this pr once #9611 (comment) is merged,

Copy link
Collaborator

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just one minor comment. Reusing the regular expression used for matching conversion specifiers reduces code duplication and makes it more likely that we parse format strings consistently now and in the future.

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