Skip to content

Commit 9f409c3

Browse files
[mypyc] Refactor: reuse format string parser (#10894)
`parse_conversion_specifiers` and `parse_format_value` from mypy.checkstrformat can be reused when compiling string formatting. `can_optimize_format` and `split_braces` are useless now. Adding `start_pos` as an attribute of ConversionSpecifier can not only help parse literals but also help generate useful error messages in the future.
1 parent 7d9f20a commit 9f409c3

File tree

4 files changed

+189
-244
lines changed

4 files changed

+189
-244
lines changed

0 commit comments

Comments
 (0)