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 / functional / invalid_name.py @ 745
History | View | Annotate | Download (615 Bytes)
1 |
""" Tests for invalid-name checker. """
|
---|---|
2 |
# pylint: disable=unused-import, no-absolute-import, wrong-import-position
|
3 |
|
4 |
AAA = 24
|
5 |
try:
|
6 |
import collections |
7 |
except ImportError: |
8 |
collections = None
|
9 |
|
10 |
aaa = 42 # [invalid-name] |
11 |
try:
|
12 |
import time |
13 |
except ValueError: |
14 |
time = None # [invalid-name] |
15 |
|
16 |
try:
|
17 |
from sys import argv, executable as python |
18 |
except ImportError: |
19 |
argv = 42
|
20 |
python = 24
|
21 |
|
22 |
def test(): |
23 |
""" Shouldn't emit an invalid-name here. """
|
24 |
try:
|
25 |
import re |
26 |
except ImportError: |
27 |
re = None
|
28 |
return re
|
29 |
|
30 |
def a(): # [invalid-name] |
31 |
"""yo"""
|