Skip to content

Commit 33880ac

Browse files
authored
Merge pull request #150 from kyb3r/cleanup
[WIP] Modmail internal cleanup
2 parents 6489af2 + 0acfc2c commit 33880ac

20 files changed

+2892
-1406
lines changed

.lint.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import sys
2+
from os import listdir
3+
from os.path import join
4+
5+
from pylint.lint import Run
6+
7+
THRESHOLD = 9.75
8+
9+
cogs = [join('cogs', c) for c in listdir('cogs') if c.endswith('.py')]
10+
core = [join('core', c) for c in listdir('core') if c.endswith('.py')]
11+
12+
results = Run(['bot.py', *cogs, *core],
13+
do_exit=False)
14+
15+
score = results.linter.stats['global_note']
16+
if score <= THRESHOLD:
17+
sys.exit(1)

0 commit comments

Comments
 (0)