misc: change django-upgrade target version to 3.2 (#75442)
This commit is contained in:
parent
a5dac4e9a6
commit
7beeffed2a
|
@ -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
2
README
|
@ -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.)
|
||||||
|
|
|
@ -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'),
|
||||||
]
|
]
|
||||||
|
|
|
@ -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'),
|
||||||
]
|
]
|
||||||
|
|
|
@ -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',
|
||||||
|
|
Loading…
Reference in New Issue