mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-11 00:32:24 +03:00
Add pyupgrade - django-upgrade checks
This commit is contained in:
parent
a7a8b3dca6
commit
9561a7e7d8
29
.github/workflows/upgrade.yml
vendored
Normal file
29
.github/workflows/upgrade.yml
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
# https://github.com/pre-commit/action
|
||||
|
||||
name: "upgrade the code"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request: ~
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.4.0
|
||||
name: Checkout
|
||||
|
||||
- uses: actions/setup-python@v2.3.1
|
||||
name: Install Python
|
||||
|
||||
- uses: pre-commit/action@v2.0.3
|
||||
name: pyupgrade (3.7)
|
||||
with:
|
||||
extra_args: pyupgrade --all-files
|
||||
|
||||
- uses: pre-commit/action@v2.0.3
|
||||
name: django-upgrade (2.2)
|
||||
with:
|
||||
extra_args: django-upgrade --all-files
|
12
.pre-commit-config.yaml
Normal file
12
.pre-commit-config.yaml
Normal file
|
@ -0,0 +1,12 @@
|
|||
repos:
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: v2.31.0
|
||||
hooks:
|
||||
- id: pyupgrade
|
||||
args: [--py37-plus]
|
||||
|
||||
- repo: https://github.com/adamchainz/django-upgrade
|
||||
rev: 1.4.0
|
||||
hooks:
|
||||
- id: django-upgrade
|
||||
args: [--target-version, "2.2"]
|
Loading…
Reference in New Issue
Block a user