OILS / mycpp / examples / invalid_format_args.py View on Github | oilshell.org

15 lines, 4 significant
1#!/usr/bin/env python2
2"""
3invalid_format_args.py
4"""
5from __future__ import print_function
6
7
8def run_tests():
9 # type: () -> None
10
11 # MyPy catches this: too many args
12 s = '%s %%' % ('x', 42)
13
14 # Too few args
15 s = '%s %d' % 'x'