JukkaL/mypy — pull request #472 by spkersten (2014-10-09 19:49:27+00:00)
Title: Type checking of string interpolation using %

Fixes #469.

Example:
```python
print('%d' % 4)

print('%d' % 's')

print('%d %d ' % 5)
print('%d %d ' % (5, 5))
print('%d %d ' % (5, 5, 5))
```
mypy output:
```
line 3: Incompatible types in string interpolation (expression has type "str", placeholder has type "int")
line 5: Not enough arguments for format string
line 7: Not all arguments converted during string formatting
```

Supported placeholders: s, d, e, E, f, g, G, o, x, X, and c.

More complicated placeholders like `%3.2f` are not supported yet. I'll see if I've time for that this weekend. But the current implementation would already cover a lot, I think.