-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpylintrc-test
70 lines (48 loc) · 2.08 KB
/
pylintrc-test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
[BASIC]
# Good variable names which should always be accepted, separated by a comma
good-names=i,j,k,e,_
# Private entries do not need documentation
# Yes, private entries must be marked with a single not a double underscore
no-docstring-rgx=_.*
[FORMAT]
# we follow a genral practice
max-line-length=79
[MESSAGES CONTROL]
# I0011 - locally disabling ...
# If a pylint message is locally disabled - there is a reason for it. There is no need
# To show a warning
# C0111 - Missing docstring
# There is no reason to have docstrings in unittests - their code MUST be self evident
# R0201 - Method could be a function
# Test methods should remain test methods of a unittest.TestCase subclass
# C0103 - Invalid method name
# It is fine to have long names for test methods to make unittest logs more descriptive
# F0401 - Import failure
# If some test dependency is not satisfied during a pylint check - it is totally fine
# the problem is going to be caught during the testing phase
# R0903 - Too few public methods
# When mocking it is crutial to be able to create fakes with only the methods
# in question to be implemented (in many cases just one)
# R0904 - Too many public methods
# Unit test cases are supposed to have a lot of test methods in contrast to the
# few ones that test a bunch of individual cases
# E1101 - Instance of '??' has no '??' member
# Pylint can't handle mock objects properly - ignore this error it will be caught in tests
# R0902 - Too many instance attributes
# This is totally fine in unit tests to prevent accessing return_value of the mocks
# too often
disable=I0011, C0111, R0201, C0103, F0401, R0903, R0904, E1101, R0902
[REPORTS]
# set the output format. Available formats are text, parseable, colorized and html
output-format=text
# reasonable message template
msg-template=@{line}: [{msg_id} {symbol}] {msg}
[MASTER]
# given that numpy is a C extension it has to be white-listed
extension-pkg-whitelist=numpy
fail_under=9
[TYPECHECK]
# numpy has a bunch of dynamically created fields invisible for pylint
# they need to be ignored
ignored-modules = numpy
ignored-classes = numpy