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
|
#!/usr/bin/env python3
import sys
import subprocess
DISABLED_CHECKS = [
'C0103', # invalid-name
'C0201', # consider-iterating-dictionary
'C0206', # consider-using-f-string
'C0209', # consider-using-dict-items
'C0301', # line-too-long
'C0326', # bad-whitespace
'C0330', # bad-continuation
'W0201', # attribute-defined-outside-init
'W0212', # protected-access
'W0221', # arguments-differ
'W0231', # super-init-not-called
'W0233', # non-parent-init-called
'W0621', # redefined-outer-name
'W0622', # redefined-builtin
'W0707', # raise-missing-from
'R0201', # no-self-use
'R0801', # duplicate-code
'E1101', # no-member
'E1135', # unsupported-membership-test
]
def run_pylint_test():
cmd = [
'pylint',
'nbxmpp',
f'--disable={",".join(DISABLED_CHECKS)}'
]
try:
subprocess.run(cmd, check=True)
except subprocess.CalledProcessError:
sys.exit('pylint test failed')
if __name__ == '__main__':
run_pylint_test()
|