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.

func_w0612.py 985B

12345678910111213141516171819202122232425262728293031323334353637
  1. """test unused variable
  2. """
  3. # pylint: disable=invalid-name, redefined-outer-name, no-absolute-import
  4. from __future__ import print_function
  5. PATH = OS = collections = deque = None
  6. def function(matches):
  7. """"yo"""
  8. aaaa = 1
  9. index = -1
  10. for match in matches:
  11. index += 1
  12. print(match)
  13. def visit_if(self, node):
  14. """increments the branches counter"""
  15. branches = 1
  16. # don't double count If nodes coming from some 'elif'
  17. if node.orelse and len(node.orelse) > 1:
  18. branches += 1
  19. self.inc_branch(branches)
  20. self.stmts += branches
  21. def test_global():
  22. """ Test various assignments of global
  23. variables through imports.
  24. """
  25. global PATH, OS, collections, deque
  26. from os import path as PATH
  27. import os as OS
  28. import collections
  29. from collections import deque
  30. # make sure that these triggers unused-variable
  31. from sys import platform
  32. from sys import version as VERSION
  33. import this
  34. import re as RE