diff options
author | Ionel Cristian Maries <contact@ionelmc.ro> | 2015-02-14 18:13:20 +0200 |
---|---|---|
committer | Ionel Cristian Maries <contact@ionelmc.ro> | 2015-02-14 18:13:20 +0200 |
commit | 6d8412476a296b3a3691af1ffabcb672d9a4920f (patch) | |
tree | e358c7e886ff4d67d0efc6263f0472655efddfff /pylint/test/functional/defined_and_used_on_same_line.py | |
parent | 0369bd6a914af3ad92ce53eac3786bf8de785f7f (diff) | |
download | pylint-6d8412476a296b3a3691af1ffabcb672d9a4920f.tar.gz |
Move all package files to a pylint package.
Diffstat (limited to 'pylint/test/functional/defined_and_used_on_same_line.py')
-rw-r--r-- | pylint/test/functional/defined_and_used_on_same_line.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/pylint/test/functional/defined_and_used_on_same_line.py b/pylint/test/functional/defined_and_used_on_same_line.py new file mode 100644 index 0000000..fc19dc7 --- /dev/null +++ b/pylint/test/functional/defined_and_used_on_same_line.py @@ -0,0 +1,30 @@ +"""Check for definitions and usage happening on the same line.""" +#pylint: disable=missing-docstring,multiple-statements,print-statement,no-absolute-import,parameter-unpacking + +print [index + for index in range(10)] + +print((index + for index in range(10))) + +FILTER_FUNC = lambda x: not x + +def func(xxx): return xxx + +def func2(xxx): return xxx + func2(1) + +import sys; print sys.exc_info() + +for i in range(10): print i + +j = 4; LAMB = lambda x: x+j + +FUNC4 = lambda a, b: a != b +FUNC3 = lambda (a, b): a != b + +# test http://www.logilab.org/ticket/6954: + +with open('f') as f: print f.read() + +with open('f') as f, open(f.read()) as g: + print g.read() |