Added a better way to delete users. Catched the exception for perm_list.
[e_cidadania.git] / tests / pylint.py
blobfe9b7e35c501577ad67268345929e95ad414969a
1 #/usr/bin/env python
2 # -*- coding: utf-8 -*-
4 # Copyright (c) 2010-2012 Cidadania S. Coop. Galega
6 # This file is part of e-cidadania.
8 # e-cidadania is free software: you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation, either version 3 of the License, or
11 # (at your option) any later version.
13 # e-cidadania is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with e-cidadania. If not, see <http://www.gnu.org/licenses/>.
21 from pylint import lint
23 import sys
25 def run_pylint():
26 """Runs pylint on the module supplied via command line arguments.
28 Usage:
30 >>> bin/python tests/pylint.py path_to_module_or_package
32 where path_to_module is the relative or absolute path to the module
33 or package which you want to test with pylint.
35 The format of the message output by pylint is:
36 MESSAGE_TYPE: LINE_NUM:[OBJECT:] MESSAGE
37 where MESSAGE_TYPE can be C(convention), R(refactor), W(warning),
38 E(Error), F(Fatal)
40 Reports generation is disabled by default.
41 Ids are included with message types by default.
42 These settings can be changed in the args variable below.
44 For a full list of command line options pass --help .
46 For more information please refer to the pyline manual at
47 http://www.logilab.org/card/pylint_manual
48 """
49 args = [
50 '--reports=n',
51 '--include-ids=y']
52 sys.argv.extend(args)
53 lint.Run(sys.argv[1:])
55 if __name__=='__main__':
56 run_pylint()