Statistics
| Revision:

gvsig-scripting / org.gvsig.scripting / trunk / org.gvsig.scripting / org.gvsig.scripting.app / org.gvsig.scripting.app.mainplugin / src / main / resources-plugin / scripting / lib / pylint / test / input / func_e13xx.py @ 745

History | View | Annotate | Download (785 Bytes)

1
"""test string format error
2
"""
3
# pylint: disable=print-statement,unsupported-binary-operation
4
from __future__ import print_function
5

    
6
PARG_1 = PARG_2 = PARG_3 = 1
7

    
8
def pprint():
9
    """Test string format
10
    """
11
    print("%s %s" % {'PARG_1': 1, 'PARG_2': 2}) # E1306
12
    print("%s" % (PARG_1, PARG_2)) # E1305
13
    print("%(PARG_1)d %d" % {'PARG_1': 1, 'PARG_2': 2}) # E1302
14
    print("%(PARG_1)d %(PARG_2)d" % {'PARG_1': 1}) # E1304
15
    print("%(PARG_1)d %(PARG_2)d" % {'PARG_1': 1, 'PARG_2':2, 'PARG_3':3}) #W1301
16
    print("%(PARG_1)d %(PARG_2)d" % {'PARG_1': 1, 2:3}) # W1300 E1304
17
    print("%(PARG_1)d %(PARG_2)d" % (2, 3)) # 1303
18
    print("%(PARG_1)d %(PARG_2)d" % [2, 3]) # 1303
19
    print("%2z" % PARG_1)
20
    print("strange format %2" % PARG_2)
21
    print("works in 3 %a" % 1)