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_w0612.py @ 745

History | View | Annotate | Download (985 Bytes)

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

    
7
def function(matches):
8
    """"yo"""
9
    aaaa = 1
10
    index = -1
11
    for match in matches:
12
        index += 1
13
        print(match)
14

    
15
def visit_if(self, node):
16
    """increments the branches counter"""
17
    branches = 1
18
    # don't double count If nodes coming from some 'elif'
19
    if node.orelse and len(node.orelse) > 1:
20
        branches += 1
21
    self.inc_branch(branches)
22
    self.stmts += branches
23

    
24
def test_global():
25
    """ Test various assignments of global
26
    variables through imports.
27
    """
28
    global PATH, OS, collections, deque
29
    from os import path as PATH
30
    import os as OS
31
    import collections
32
    from collections import deque
33
    # make sure that these triggers unused-variable
34
    from sys import platform
35
    from sys import version as VERSION
36
    import this
37
    import re as RE