src/eric7/Documentation/Source/eric7.Plugins.CheckerPlugins.CodeStyleChecker.pycodestyle.html

branch
eric7
changeset 9596
397f385b95d8
parent 9377
b9c8dc3b7da1
child 10189
1ab3a4674cb4
equal deleted inserted replaced
9595:2bd590c40309 9596:397f385b95d8
997 E741: O = 123 997 E741: O = 123
998 E741: I = 42 998 E741: I = 42
999 </p> 999 </p>
1000 <p> 1000 <p>
1001 Variables can be bound in several other contexts, including class 1001 Variables can be bound in several other contexts, including class
1002 and function definitions, 'global' and 'nonlocal' statements, 1002 and function definitions, lambda functions, 'global' and 'nonlocal'
1003 exception handlers, and 'with' and 'for' statements. 1003 statements, exception handlers, and 'with' and 'for' statements.
1004 In addition, we have a special handling for function parameters. 1004 In addition, we have a special handling for function parameters.
1005 </p> 1005 </p>
1006 <p> 1006 <p>
1007 Okay: except AttributeError as o: 1007 Okay: except AttributeError as o:
1008 Okay: with lock as L: 1008 Okay: with lock as L:
1009 Okay: foo(l=12) 1009 Okay: foo(l=12)
1010 Okay: foo(l=I)
1010 Okay: for a in foo(l=12): 1011 Okay: for a in foo(l=12):
1012 Okay: lambda arg: arg * l
1013 Okay: lambda a=l[I:5]: None
1014 Okay: lambda x=a.I: None
1015 Okay: if l >= 12:
1011 E741: except AttributeError as O: 1016 E741: except AttributeError as O:
1012 E741: with lock as l: 1017 E741: with lock as l:
1013 E741: global I 1018 E741: global I
1014 E741: nonlocal l 1019 E741: nonlocal l
1015 E741: def foo(l): 1020 E741: def foo(l):
1016 E741: def foo(l=12): 1021 E741: def foo(l=12):
1017 E741: l = foo(l=12) 1022 E741: l = foo(l=12)
1018 E741: for l in range(10): 1023 E741: for l in range(10):
1024 E741: [l for l in lines if l]
1025 E741: lambda l: None
1026 E741: lambda a=x[1:5], l: None
1027 E741: lambda **l:
1028 E741: def f(**l):
1019 E742: class I(object): 1029 E742: class I(object):
1020 E743: def l(x): 1030 E743: def l(x):
1021 </p> 1031 </p>
1022 <div align="right"><a href="#top">Up</a></div> 1032 <div align="right"><a href="#top">Up</a></div>
1023 <hr /> 1033 <hr />
1498 Each comma, semicolon or colon should be followed by whitespace. 1508 Each comma, semicolon or colon should be followed by whitespace.
1499 </p> 1509 </p>
1500 <p> 1510 <p>
1501 Okay: [a, b] 1511 Okay: [a, b]
1502 Okay: (3,) 1512 Okay: (3,)
1513 Okay: a[3,] = 1
1503 Okay: a[1:4] 1514 Okay: a[1:4]
1504 Okay: a[:4] 1515 Okay: a[:4]
1505 Okay: a[1:] 1516 Okay: a[1:]
1506 Okay: a[1:4:2] 1517 Okay: a[1:4:2]
1507 E231: ['a','b'] 1518 E231: ['a','b']

eric ide

mercurial