misc: change django-upgrade target version to 3.2 (#75442)

This commit is contained in:
Valentin Deniaud 2023-03-15 17:41:43 +01:00
parent a5dac4e9a6
commit 7beeffed2a
5 changed files with 10 additions and 10 deletions

View File

@ -7,10 +7,10 @@ repos:
- id: pyupgrade - id: pyupgrade
args: ['--keep-percent-format', '--py37-plus'] args: ['--keep-percent-format', '--py37-plus']
- repo: https://github.com/adamchainz/django-upgrade - repo: https://github.com/adamchainz/django-upgrade
rev: 1.10.0 rev: 1.13.0
hooks: hooks:
- id: django-upgrade - id: django-upgrade
args: ['--target-version', '2.2'] args: ['--target-version', '3.2']
- repo: https://github.com/psf/black - repo: https://github.com/psf/black
rev: 22.3.0 rev: 22.3.0
hooks: hooks:

2
README
View File

@ -354,7 +354,7 @@ djhtml is used to automatically indent html files, using those parameters:
django-upgrade is used to automatically upgrade Django syntax, using those parameters: django-upgrade is used to automatically upgrade Django syntax, using those parameters:
django-upgrade --target-version 2.2 django-upgrade --target-version 3.2
There is .pre-commit-config.yaml to use pre-commit to automatically run these tools There is .pre-commit-config.yaml to use pre-commit to automatically run these tools
before commits. (execute `pre-commit install` to install the git hook.) before commits. (execute `pre-commit install` to install the git hook.)

View File

@ -14,7 +14,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from django.http import HttpResponse from django.http import HttpResponse
from django.urls import include, path, re_path from django.urls import include, path
def homepage(request): def homepage(request):
@ -22,6 +22,6 @@ def homepage(request):
urlpatterns = [ urlpatterns = [
re_path('^', include('mellon.urls')), path('', include('mellon.urls')),
path('', homepage, name='homepage'), path('', homepage, name='homepage'),
] ]

View File

@ -14,7 +14,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from django.http import HttpResponse from django.http import HttpResponse
from django.urls import include, path, re_path from django.urls import include, path
def homepage(request): def homepage(request):
@ -22,6 +22,6 @@ def homepage(request):
urlpatterns = [ urlpatterns = [
re_path('^', include('mellon.urls'), kwargs={'template_base': 'theme.html'}), path('', include('mellon.urls'), kwargs={'template_base': 'theme.html'}),
path('', homepage, name='homepage'), path('', homepage, name='homepage'),
] ]

View File

@ -14,7 +14,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from django.http import HttpResponse from django.http import HttpResponse
from django.urls import include, path, re_path from django.urls import include, path
def homepage(request): def homepage(request):
@ -26,8 +26,8 @@ def context_hook(context):
urlpatterns = [ urlpatterns = [
re_path( path(
'^', '',
include('mellon.urls'), include('mellon.urls'),
kwargs={ kwargs={
'template_base': 'theme.html', 'template_base': 'theme.html',