Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Detect if required string literal escapes are missing from a type #948
Mypy should complain about code that isn't using string literal escaped when they are required:
Initially we could only detect these cases within a single module. A more general solution would also detect string literal types needed due to cyclic imports.
A simple implementation idea:
We also need deal with type aliases, but this isn't needed for the first iteration.
I think that somebody started working on this a while back, but I can't remember the details. Maybe there is an existing issue as well?