Browse Source

Add an RC file for the linter

master
Timur Demin 3 months ago
parent
commit
c07f570ba0
Signed by: Timur Demin <me@tdem.in> GPG Key ID: 9EDF3F9D9286FA20
2 changed files with 111 additions and 1 deletions
  1. 1
    1
      .drone.yml
  2. 110
    0
      .pylintrc

+ 1
- 1
.drone.yml View File

@@ -6,4 +6,4 @@ steps:
6 6
   image: python:3.7-stretch
7 7
   commands:
8 8
   - pip install pylint
9
-  - pylint $(find . -name "*.py")
9
+  - pylint scarlet_export

+ 110
- 0
.pylintrc View File

@@ -0,0 +1,110 @@
1
+[MASTER]
2
+persistent=no
3
+load-plugins=
4
+jobs=1
5
+unsafe-load-any-extension=no
6
+extension-pkg-whitelist=
7
+
8
+[MESSAGES CONTROL]
9
+# Only show warnings with the listed confidence levels. Leave empty to show
10
+# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
11
+confidence=
12
+disable=
13
+    attribute-defined-outside-init,
14
+    duplicate-code,
15
+    fixme,
16
+    invalid-name,
17
+    missing-docstring,
18
+    protected-access,
19
+    too-few-public-methods,
20
+    # handled by black
21
+    format
22
+
23
+[REPORTS]
24
+output-format=colorized
25
+files-output=no
26
+reports=no
27
+evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
28
+
29
+[LOGGING]
30
+logging-modules=logging
31
+
32
+[MISCELLANEOUS]
33
+notes=FIXME,XXX,TODO
34
+
35
+[SIMILARITIES]
36
+min-similarity-lines=4
37
+ignore-comments=yes
38
+ignore-docstrings=yes
39
+ignore-imports=no
40
+
41
+[VARIABLES]
42
+init-import=no
43
+dummy-variables-rgx=_$|dummy
44
+additional-builtins=
45
+callbacks=cb_,_cb
46
+
47
+[FORMAT]
48
+max-line-length=100
49
+ignore-long-lines=^\s*(# )?<?https?://\S+>?$
50
+single-line-if-stmt=no
51
+no-space-check=trailing-comma,dict-separator
52
+max-module-lines=2000
53
+indent-string='    '
54
+indent-after-paren=4
55
+expected-line-ending-format=
56
+
57
+[BASIC]
58
+bad-functions=map,filter,input
59
+good-names=i,j,k,ex,Run,_
60
+bad-names=foo,bar,baz,toto,tutu,tata
61
+name-group=
62
+include-naming-hint=yes
63
+function-rgx=[a-z_][a-z0-9_]{2,30}$
64
+function-name-hint=[a-z_][a-z0-9_]{2,30}$
65
+variable-rgx=[a-z_][a-z0-9_]{2,30}$
66
+variable-name-hint=[a-z_][a-z0-9_]{2,30}$
67
+const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
68
+const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
69
+attr-rgx=[a-z_][a-z0-9_]{2,}$
70
+attr-name-hint=[a-z_][a-z0-9_]{2,}$
71
+argument-rgx=[a-z_][a-z0-9_]{2,30}$
72
+argument-name-hint=[a-z_][a-z0-9_]{2,30}$
73
+class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
74
+class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
75
+inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
76
+inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
77
+class-rgx=[A-Z_][a-zA-Z0-9]+$
78
+class-name-hint=[A-Z_][a-zA-Z0-9]+$
79
+module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
80
+module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
81
+method-rgx=[a-z_][a-z0-9_]{2,}$
82
+method-name-hint=[a-z_][a-z0-9_]{2,}$
83
+no-docstring-rgx=__.*__
84
+docstring-min-length=-1
85
+property-classes=abc.abstractproperty
86
+
87
+[TYPECHECK]
88
+ignore-mixin-members=yes
89
+ignored-modules=
90
+ignored-classes=SQLObject, optparse.Values, thread._local, _thread._local
91
+generated-members=REQUEST,acl_users,aq_parent
92
+contextmanager-decorators=contextlib.contextmanager
93
+
94
+[DESIGN]
95
+max-args=8
96
+ignored-argument-names=_.*
97
+max-locals=25
98
+max-returns=11
99
+max-branches=26
100
+max-statements=100
101
+max-parents=7
102
+max-attributes=11
103
+min-public-methods=2
104
+max-public-methods=25
105
+
106
+[CLASSES]
107
+defining-attr-methods=__init__,__new__,setUp
108
+valid-classmethod-first-arg=cls
109
+valid-metaclass-classmethod-first-arg=mcs
110
+exclude-protected=_asdict,_fields,_replace,_source,_make

Loading…
Cancel
Save