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
|
||||
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
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 --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.)
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from django.http import HttpResponse
|
||||
from django.urls import include, path, re_path
|
||||
from django.urls import include, path
|
||||
|
||||
|
||||
def homepage(request):
|
||||
|
@ -22,6 +22,6 @@ def homepage(request):
|
|||
|
||||
|
||||
urlpatterns = [
|
||||
re_path('^', include('mellon.urls')),
|
||||
path('', include('mellon.urls')),
|
||||
path('', homepage, name='homepage'),
|
||||
]
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from django.http import HttpResponse
|
||||
from django.urls import include, path, re_path
|
||||
from django.urls import include, path
|
||||
|
||||
|
||||
def homepage(request):
|
||||
|
@ -22,6 +22,6 @@ def homepage(request):
|
|||
|
||||
|
||||
urlpatterns = [
|
||||
re_path('^', include('mellon.urls'), kwargs={'template_base': 'theme.html'}),
|
||||
path('', include('mellon.urls'), kwargs={'template_base': 'theme.html'}),
|
||||
path('', homepage, name='homepage'),
|
||||
]
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from django.http import HttpResponse
|
||||
from django.urls import include, path, re_path
|
||||
from django.urls import include, path
|
||||
|
||||
|
||||
def homepage(request):
|
||||
|
@ -26,8 +26,8 @@ def context_hook(context):
|
|||
|
||||
|
||||
urlpatterns = [
|
||||
re_path(
|
||||
'^',
|
||||
path(
|
||||
'',
|
||||
include('mellon.urls'),
|
||||
kwargs={
|
||||
'template_base': 'theme.html',
|
||||
|
|
Loading…
Reference in New Issue