blob: 1b4574818d53d56e6eaa05f1f9ec1b1d186f4bd4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
""" Tests for invalid-name checker. """
# pylint: disable=unused-import, no-absolute-import
AAA = 24
try:
import collections
except ImportError:
collections = None
aaa = 42 # [invalid-name]
try:
import time
except ValueError:
time = None # [invalid-name]
try:
from sys import argv, executable as python
except ImportError:
argv = 42
python = 24
def test():
""" Shouldn't emit an invalid-name here. """
try:
import re
except ImportError:
re = None
return re
def a(): # [invalid-name]
"""yo"""
|