~ubuntuone-control-tower/ubuntuone-storage-protocol/stable-1-6

« back to all changes in this revision

Viewing changes to pylintrc

  • Committer: Tarmac
  • Author(s): Rodney Dawes
  • Date: 2010-11-16 15:10:48 UTC
  • mfrom: (121.1.4 use-packages)
  • Revision ID: tarmac-20101116151048-b0e20j7lorb4yhe1
Switch to using packaged mocker and ubuntuone-dev-tools
Use pyflakes with u1lint and also run pep8
Fix a lot of pylint/pyflakes/pep8 errors

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# lint Python modules using external checkers.
2
 
#
3
 
# This is the main checker controling the other ones and the reports
4
 
# generation. It is itself both a raw checker and an astng checker in order
5
 
# to:
6
 
# * handle message activation / deactivation at the module level
7
 
# * handle some basic but necessary stats data (number of classes, methods...)
8
 
#
9
 
[MASTER]
10
 
# Set the cache size for astng objects.
11
 
cache-size=500
12
 
 
13
 
[MESSAGES CONTROL]
14
 
# Disable some checkers
15
 
disable-checker=typecheck,design,similarities
16
 
 
17
 
# Disable all messages in the listed categories.
18
 
disable-msg-cat=R,I
19
 
 
20
 
# Disable the message(s) with the given id(s).
21
 
# :E0101: *Explicit return in __init__*
22
 
# :W0142: *Used * or ** magic*
23
 
# :W0221: *Arguments number differs from %s method* (pylint is confused by * and **)
24
 
# :W0613: *Unused argument %r* (We get lots of these from interfaces)
25
 
# :W0621: *Redefining name %r from outer scope (line %s)* (pylint does a poor evaluation)
26
 
# :W0622: *Redefining built-in '%r'
27
 
# :W0212: *Access to a protected member %r of a client class*
28
 
disable-msg=E0101,W0142,W0221,W0613,W0621,W0622,W0212
29
 
disable=typecheck,design,similarities,R,I,E0101,W0142,W0221,W0613,W0621,W0622,W0212
30
 
 
31
 
 
32
 
[REPORTS]
33
 
# Tells wether to display a full report or only the messages
34
 
reports=no
35
 
 
36
 
 
37
 
# checks for :
38
 
# * doc strings
39
 
# * modules / classes / functions / methods / arguments / variables name
40
 
# * number of arguments, local variables, branchs, returns and statements in
41
 
# functions, methods
42
 
# * required module attributes
43
 
# * dangerous default values as arguments
44
 
# * redefinition of function / method / class
45
 
# * uses of the global statement
46
 
#
47
 
[BASIC]
48
 
enable-basic=yes
49
 
 
50
 
# Required attributes for module, separated by a comma
51
 
required-attributes=
52
 
 
53
 
# Regular expression which should only match functions or classes name which do
54
 
# not require a docstring
55
 
no-docstring-rgx=(__.*__|setUp|tearDown)
56
 
 
57
 
# Regular expression which should only match correct module names
58
 
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
59
 
 
60
 
# Regular expression which should only match correct module level names
61
 
const-rgx=([a-z_][a-z0-9_]*|[A-Z_][A-Z0-9_]*)$
62
 
 
63
 
# Regular expression which should only match correct class names
64
 
class-rgx=[A-Z_][a-zA-Z0-9]+$
65
 
 
66
 
# Regular expression which should only match correct function names
67
 
function-rgx=[a-z_][a-zA-Z0-9_]*$
68
 
 
69
 
# Regular expression which should only match correct method names
70
 
method-rgx=[a-z_][a-zA-Z0-9_]*$
71
 
 
72
 
# Regular expression which should only match correct instance attribute names
73
 
attr-rgx=[a-z_][a-zA-Z0-9_]*$
74
 
 
75
 
# Regular expression which should only match correct argument names
76
 
argument-rgx=[a-z_][a-zA-Z0-9_]{1,30}$
77
 
 
78
 
# Regular expression which should only match correct variable names
79
 
# They are normally all lowercase, but when a constant, they are all uppercase.
80
 
variable-rgx=([a-z_][a-z0-9_]*|[A-Z_][A-Z0-9_]*)$
81
 
 
82
 
# Regular expression which should only match correct list comprehension /
83
 
# generator expression variable names
84
 
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
85
 
 
86
 
# Good variable names which should always be accepted, separated by a comma
87
 
# Update this to supress warnings about inherrited names (C0103)
88
 
good-names=_,a,b,c,i,j,k,v,d,f,s,t,l,ex,_,orderBy,getByName,clauseTables
89
 
 
90
 
# Bad variable names which should always be refused, separated by a comma
91
 
bad-names=foo,bar,baz,toto,tutu,tata
92
 
 
93
 
# List of builtins function names that should not be used, separated by a comma
94
 
bad-functions=apply,input,reduce
95
 
 
96
 
 
97
 
# checks for:
98
 
# * warning notes in the code like FIXME, XXX
99
 
# * PEP 263: source code with non ascii character but no encoding declaration
100
 
#
101
 
[MISCELLANEOUS]
102
 
# List of note tags to take in consideration, separated by a comma.
103
 
notes=FIXME,XXX,TODO,fixme,todo
104
 
 
105
 
 
106
 
# checks for :
107
 
# * unauthorized constructions
108
 
# * strict indentation
109
 
# * line length
110
 
# * use of <> instead of !=
111
 
#
112
 
[FORMAT]
113
 
enable-format=yes
114
 
 
115
 
# Maximum number of characters on a single line.
116
 
max-line-length=80
117
 
 
118
 
# Maximum number of lines in a module
119
 
max-module-lines=2000
120
 
 
121
 
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
122
 
# tab).
123
 
indent-string='    '