Skip to content

Commit

Permalink
[ci] Fix pylint conflits
Browse files Browse the repository at this point in the history
  • Loading branch information
k-ye committed Nov 14, 2021
1 parent 451e2f9 commit 9620c85
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/presubmit.yml
Expand Up @@ -88,7 +88,7 @@ jobs:
exit 0
fi
# Make sure pylint doesn't regress
pylint python/taichi/ --disable=all --enable=C0121,C0415,W0101,W0401,W0611,W0202,W0235,R0205,R0402,R1703,R1705,R1732,C0200,R0201,W0108,W0404,C0209
pylint python/taichi/ --disable=all --enable=$(python scripts/generate_pylint_tags.py)
if [ $? -eq 0 ]
then
echo "PASSED: pylint is happy"
Expand Down
29 changes: 29 additions & 0 deletions scripts/generate_pylint_tags.py
@@ -0,0 +1,29 @@
TAGS = {
'C0121': True,
'C0415': True,
'W0611': True,
'W0202': True,
'W0621': False,
'W0622': False,
'W0401': True,
'C0209': True,
'W0404': False,
'W0612': False,
'E1101': False,
'R0402': True,
'R0201': True,
'W0235': True,
'R1705': True,
'C0200': True,
'R0205': True,
'R1732': True,
'W0101': True,
'R1710': False,
'R1703': True,
'W0108': True,
}

if __name__ == '__main__':
enabled = tuple(
map(lambda kv: kv[0], filter(lambda kv: kv[1], TAGS.items())))
print(','.join(enabled))

0 comments on commit 9620c85

Please sign in to comment.