Newer
Older
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
[![licence-badge]](/LICENCE.txt)
Pre-Commit Hook: Pylint
=======================
**An improved Pylint hook for [pre-commit][]**
Unlike the official Pylint pre-commit hook, this hook installs dependencies so that Pylint
can analyse external calls properly and avoid warnings about missing modules.
Using with pre-commit
---------------------
Add the following to your `.pre-commit-config.yaml`:
- repo: https://code.kodo.org.uk/dom/pre-commit-pylint
rev: v2.6.0
hooks:
- id: pylint
# args: [...]
Configuration
-------------
Configuration is done by adding arguments to the hook in `.pre-commit-config.yaml`.
Any arguments supported by [Pylint][pylint-cmdline] are allowed, along with a few others
listed below.
##### `--extras=[EXTRA[,EXTRA...]]`
**Alias:** `-e`
**Argument:** A comma separated list of package extras to install.
**Description:** Extras are named groups of optional extra dependencies listed in
a project's metadata and normally added to the packaging configuration. If Pylint complains
about being unable to find a module listed in an extras group, the group will need to be
included here.
##### `--editable|--non-editable`
**Description:** Enable or disable editable mode install of the package in the Pylint
environment. This is only available to packages using *setuptools* and is enabled by
default when `setup.py` is detected. It may improve environment setup times.
---
[licence-badge]:
https://img.shields.io/badge/licence-MPL--2.0-orange.svg
"Licence: MPL-2.0"
[pre-commit]:
https://pre-commit.com/
"pre-commit documentation"
[pylint-cmdline]:
http://pylint.pycqa.org/en/latest/user_guide/run.html#command-line-options
"Pylint Command Line Options"