Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upsix: ensure_str / ensure_binary / ensure_text of a literal string #236
Comments
|
Would it be possible to add support for |
|
pyupgrade doesn't do any type inference beyond literals -- it's a hard problem |
|
too bad! Thx for the quick answer! And using a different library for that, e.g. pylint/mypy,.., that can infer types, is probably still hard, right? |
|
neither mypy nor pylint expose their type inference as a library -- plus they're both dog-slow |
|
Didn't know that they don't expose their type inference as a lib. IMO the fact that they are slow is not a disqualifier. |
|
ok well it is |
while we generally can't fix the ensure_* variants, we can for string literals (as we're already doing for
str('...')for example)