File tree Expand file tree Collapse file tree 3 files changed +34
-8
lines changed
Expand file tree Collapse file tree 3 files changed +34
-8
lines changed Original file line number Diff line number Diff line change 11repos :
2- # - repo: https://github.com/pre-commit/pre-commit-hooks
3- # rev: v4.3.0
4- # hooks:
5- # - id: check-yaml
6- # - id: end-of-file-fixer
7- # - id: trailing-whitespace
82- repo : https://github.com/psf/black
93 rev : 22.8.0
104 hooks :
1812 types : [python]
1913 args :
2014 [
15+ " -rn" , # Only display messages
2116 " --rcfile=.pylintrc" , # Link to your config file
2217 ]
Original file line number Diff line number Diff line change 1+ # Python Lint Example
2+
3+ The example project installs ` pre-commit ` , ` black ` and ` pylint ` to demonstrate how to apply formatting and linting to a ` git ` commit.
4+
5+ ## Pre-requisites
6+
7+ Run ` $ pip install -r requirements.txt `
8+
9+ ## pre-commit
10+
11+ Runs hooks on every commit to automatically point out issues in code.
12+
13+ Run ` $ pre-commit install ` to setup the git hook scripts
14+
15+ https://pre-commit.com/
16+
17+ ## black
18+
19+ Black is the uncompromising Python code formatter.
20+
21+ Run ` black *.py `
22+
23+ https://pypi.org/project/black/
24+
25+ ## pylint
26+
27+ Pylint is a static code analyser for Python.
28+
29+ Run ` pylint *.py `
30+
31+ https://pypi.org/project/pylint/
Original file line number Diff line number Diff line change 11requests
2- pre-commit
3- pylint
2+ pre - commit
43black
4+ pylint
You can’t perform that action at this time.
0 commit comments