forked from albertas/deadcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconstants.py
More file actions
49 lines (43 loc) · 838 Bytes
/
Copy pathconstants.py
File metadata and controls
49 lines (43 loc) · 838 Bytes
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
from typing import Dict, Literal
UnusedCodeType = Literal[
'attribute',
'class',
'function',
'import',
'method',
'property',
'variable',
'unreachable_code',
'name',
'unused_file',
'commented_out_code',
'ignore_expression',
]
UnusedCodeErrorCode = Literal[
'DC01',
'DC02',
'DC03',
'DC04',
'DC05',
'DC06',
'DC07',
'DC08',
'DC09',
'DC11',
'DC12',
'DC13',
]
ERROR_TYPE_TO_ERROR_CODE: Dict[UnusedCodeType, UnusedCodeErrorCode] = {
'variable': 'DC01',
'function': 'DC02',
'class': 'DC03',
'method': 'DC04',
'attribute': 'DC05',
'name': 'DC06',
'import': 'DC07',
'property': 'DC08',
'unreachable_code': 'DC09',
'unused_file': 'DC11',
'commented_out_code': 'DC12',
'ignore_expression': 'DC13',
}