File tree Expand file tree Collapse file tree 8 files changed +51
-9
lines changed Expand file tree Collapse file tree 8 files changed +51
-9
lines changed Original file line number Diff line number Diff line change 1+ exclude : \/migrations\/
2+ default_language_version :
3+ python : python3
4+ repos :
5+ - repo : https://github.com/pre-commit/pre-commit-hooks
6+ rev : " v4.3.0"
7+ hooks :
8+ - id : debug-statements
9+ - id : detect-private-key
10+ - id : file-contents-sorter
11+ files : ^(requirements/\w*.txt)$
12+ args : ["--ignore-case", "--unique"]
13+ - id : fix-encoding-pragma
14+ args : ["--remove"]
15+ - repo : https://github.com/pycqa/isort
16+ rev : " 5.10.1"
17+ hooks :
18+ - id : isort
19+ - repo : https://github.com/pycqa/flake8
20+ rev : " 5.0.4"
21+ hooks :
22+ - id : flake8
Original file line number Diff line number Diff line change @@ -394,3 +394,27 @@ Running Locally with Docker
394394
395395 docker-compose exec web tox
396396 docker-compose exec web python -m manage test
397+
398+ Pre-commit checks
399+ -----------------
400+
401+ `pre-commit <https://pre-commit.com >`_ is a framework for managing pre-commit
402+ hooks. These hooks help to identify simple issues before committing code for
403+ review. By checking for these issues before code review it allows the reviewer
404+ to focus on the change itself, and it can also help to reduce the number CI
405+ runs.
406+
407+ To use the tool, first install ``pre-commit `` and then the git hooks::
408+
409+ .. console ::
410+
411+ $ python3 -m pip install pre-commit
412+ $ python3 -m pre_commit install
413+
414+ On the first commit ``pre-commit `` will install the hooks, these are
415+ installed in their own environments and will take a short while to
416+ install on the first run. Subsequent checks will be significantly faster.
417+ If the an error is found an appropriate error message will be displayed.
418+ If the error was with ``isort `` then the tool will go ahead and fix them for
419+ you. Review the changes and re-stage for commit if you are happy with
420+ them.
Original file line number Diff line number Diff line change 11from decimal import ROUND_HALF_EVEN
22
3- from django import template
43import moneyed
5- from moneyed . localization import _format , format_money , _sign
6-
4+ from django import template
5+ from moneyed . localization import _format , _sign , format_money
76
87register = template .Library ()
98
Original file line number Diff line number Diff line change 22
33from .. import views
44
5-
65urlpatterns = [
76 path ('' ,
87 views .MeetingArchiveIndex .as_view (),
Original file line number Diff line number Diff line change 1- Django==3.2.15
1+ Babel==2.10.1
22django-contact-form==1.9
33django-hosts==5.1
44django-money==2.1.1
5- Babel==2.10.1
65django-push==1.1
76django-recaptcha==3.0.0
87django-registration-redux==2.10
8+ Django==3.2.15
99docutils==0.17.1
1010feedparser==6.0.8
1111Jinja2==3.1.2
Original file line number Diff line number Diff line change 11-r common.txt
2-
2+ pre-commit~=2.20.0
33transifex-client==0.14.4
44watchdog==2.1.6
Original file line number Diff line number Diff line change 11-r common.txt
2-
32django-pylibmc==0.6.1
43django-redis-cache==3.0.1
54pylibmc==1.6.1
Original file line number Diff line number Diff line change 11-r dev.txt
2-
32coverage==6.3.2
43requests-mock==1.9.3
You can’t perform that action at this time.
0 commit comments