Skip to content

Commit

Permalink
Remove lint rule; postpone to new issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mroeschke committed Nov 24, 2017
1 parent 31446b7 commit 371c22f
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions ci/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,26 +90,13 @@ if [ "$LINT" ]; then
#
# Check the following functions:
# any(), all(), sum(), max(), min(), list(), dict(), set(), frozenset(), tuple(), str.join()
grep -R --include="*.py*" -E "[^_](any|all|sum|max|min|list|dict|set|frozenset|tuple|join)\(\[.* for .* in .*\]\)" .
grep -R --include="*.py*" -E "[^_](any|all|sum|max|min|list|dict|set|frozenset|tuple|join)\(\[.* for .* in .*\]\)"

if [ $? = "0" ]; then
RET=1
fi
echo "Check for use of lists instead of generators in built-in Python functions DONE"

echo "Check for use of comprehensions using set(), dict() or list()"

# Example: Avoid `list(i for i in some_iterator)` in favor of `[i for i in some_iterator]`
#
# Check the following functions:
# list(), set(), dict()
grep -R --include="*.py*" -E "(list|dict|[^frozen]set)\([^\{)=]* for .* in [^}]*\)" .

if [ $? = "0" ]; then
RET=1
fi
echo "Check for use of comprehensions using set(), dict() or list() DONE"

else
echo "NOT Linting"
fi
Expand Down

0 comments on commit 371c22f

Please sign in to comment.