Projet

Général

Profil

0001-misc-add-django-upgrade-files-notes-69401.patch

Valentin Deniaud, 21 septembre 2022 17:11

Télécharger (1,5 ko)

Voir les différences:

Subject: [PATCH 1/2] misc: add django-upgrade files/notes (#69401)

 .pre-commit-config.yaml | 5 +++++
 README                  | 8 ++++++--
 2 files changed, 11 insertions(+), 2 deletions(-)
.pre-commit-config.yaml
16 16
    hooks:
17 17
    - id: pyupgrade
18 18
      args: ['--keep-percent-format', '--py37-plus']
19
-   repo: https://github.com/adamchainz/django-upgrade
20
    rev: 1.10.0
21
    hooks:
22
    - id: django-upgrade
23
      args: ['--target-version', '2.2']
19 24
-   repo: https://git.entrouvert.org/pre-commit-debian.git
20 25
    rev: v0.1
21 26
    hooks:
README
44 44

  
45 45
    pyupgrade --keep-percent-format --py37-plus
46 46

  
47
django-upgrade is used to automatically upgrade Django syntax, using those parameters:
48

  
49
    django-upgrade --target-version 2.2
50

  
47 51
There is .pre-commit-config.yaml to use pre-commit to automatically run black,
48
isort and pyupgrade before commits. (execute `pre-commit install` to install
49
the git hook.)
52
isort, pyupgrade and django-upgrade before commits. (execute `pre-commit install`
53
to install the git hook.)
50 54

  
51 55

  
52 56
Tests
53
-