Development of an internal social media platform with personalised dashboards for students
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

defined_and_used_on_same_line.py 676B

1234567891011121314151617181920212223242526272829
  1. """Check for definitions and usage happening on the same line."""
  2. #pylint: disable=missing-docstring,multiple-statements,no-absolute-import,parameter-unpacking,wrong-import-position
  3. from __future__ import print_function
  4. print([index
  5. for index in range(10)])
  6. print((index
  7. for index in range(10)))
  8. FILTER_FUNC = lambda x: not x
  9. def func(xxx): return xxx
  10. def func2(xxx): return xxx + func2(1)
  11. import sys; print(sys.exc_info())
  12. for i in range(10): print(i)
  13. j = 4; LAMB = lambda x: x+j
  14. FUNC4 = lambda a, b: a != b
  15. # test http://www.logilab.org/ticket/6954:
  16. with open('f') as f: print(f.read())
  17. with open('f') as f, open(f.read()) as g:
  18. print(g.read())