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

This commit is contained in:
Valentin Deniaud 2023-03-29 14:31:41 +02:00
parent c1ca1227d3
commit db400374ff
5 changed files with 9 additions and 9 deletions

View File

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

2
README
View File

@ -25,7 +25,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 --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
before commits. (execute `pre-commit install` to install the git hook.)

View File

@ -113,7 +113,7 @@ WSGI_APPLICATION = 'lingo.wsgi.application'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'ENGINE': 'django.db.backends.postgresql',
}
}

View File

@ -31,15 +31,15 @@ urlpatterns = [
re_path(r'^manage/', decorated_includes(manager_required, include(lingo_manager_urls))),
re_path(r'^manage/invoicing/', decorated_includes(manager_required, include(lingo_invoicing_urls))),
re_path(r'^manage/pricing/', decorated_includes(manager_required, include(lingo_pricing_urls))),
re_path(r'^api/', include(lingo_api_urls)),
path('api/', include(lingo_api_urls)),
path('login/', login, name='auth_login'),
path('logout/', logout, name='auth_logout'),
]
if 'mellon' in settings.INSTALLED_APPS:
urlpatterns.append(
re_path(
r'^accounts/mellon/',
path(
'accounts/mellon/',
include('mellon.urls'),
kwargs={
'template_base': 'lingo/mellon_base_template.html',
@ -55,5 +55,5 @@ if settings.DEBUG and 'debug_toolbar' in settings.INSTALLED_APPS:
import debug_toolbar # pylint: disable=import-error
urlpatterns = [
re_path(r'^__debug__/', include(debug_toolbar.urls)),
path('__debug__/', include(debug_toolbar.urls)),
] + urlpatterns

View File

@ -17,7 +17,7 @@ CACHES = {
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'ENGINE': 'django.db.backends.postgresql',
'TEST': {
'NAME': ('lingo-test-%s' % os.environ.get("BRANCH_NAME", "").replace('/', '-'))[:63],
},