Skip to content

Commit

Permalink
Integrate pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
kmmbvnr committed May 30, 2010
1 parent c77c584 commit 04c0625
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 1 deletion.
60 changes: 60 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
[MASTER]
persistent=yes

[MESSAGES CONTROL]
#enable=
#disable=

[REPORTS]
output-format=parseable

[TYPECHECK]

# Tells whether missing members accessed in mixin class should be ignored. A
# mixin class is detected if its name ends with "mixin" (case insensitive).
ignore-mixin-members=yes

# List of classes names for which member attributes should not be checked
# (useful for classes with attributes dynamically set).
ignored-classes=SQLObject

# When zope mode is activated, add a predefined set of Zope acquired attributes
# to generated-members.
zope=no

# List of members which are set dynamically and missed by pylint inference
# system, and so shouldn't trigger E0201 when accessed.
generated-members=REQUEST,acl_users,aq_parent


[VARIABLES]
init-import=no


[SIMILARITIES]
min-similarity-lines=4
ignore-comments=yes
ignore-docstrings=yes


[MISCELLANEOUS]
notes=FIXME,XXX,TODO


[FORMAT]
max-line-length=160
max-module-lines=500
indent-string=' '


[DESIGN]
max-args=5
max-locals=15
max-returns=6
max-branchs=12
max-statements=50
max-parents=7
max-attributes=7
min-public-methods=2
max-public-methods=20

6 changes: 5 additions & 1 deletion tests/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

SCRIPT_DIR=`dirname $0`
ROOT_DIR=`cd $SCRIPT_DIR/.. && pwd`
cd $ROOT_DIR

ENVSPEC=`stat -c %Y $ROOT_DIR/tests/environment.pip`
ENVTIME=`test -d $ROOT_DIR/.ve && stat -c %Y $ROOT_DIR/.ve`

set -e

cd $ROOT_DIR
if [ $ENVSPEC -gt 0$ENVTIME ]; then
# Setup environment
virtualenv --no-site-packages $ROOT_DIR/.ve
Expand All @@ -19,6 +19,9 @@ else
source $ROOT_DIR/.ve/bin/activate
fi

# pylint
pylint --rcfile=$ROOT_DIR/.pylintrc django_fsm >> pylint.out || echo 'PyLint done'

# Run tests
python <<EOF
from django import conf
Expand All @@ -38,3 +41,4 @@ class TestSettings(conf.UserSettingsHolder):
conf.settings.configure(TestSettings(conf.global_settings))
management.call_command('test')
EOF

0 comments on commit 04c0625

Please sign in to comment.