wip/75442-upgrade-hooks #3
|
@ -2,27 +2,27 @@
|
|||
# See https://pre-commit.com/hooks.html for more hooks
|
||||
repos:
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: v3.1.0
|
||||
rev: v3.3.1
|
||||
hooks:
|
||||
- id: pyupgrade
|
||||
args: ['--keep-percent-format', '--py37-plus']
|
||||
args: ['--keep-percent-format', '--py39-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
|
||||
rev: 23.1.0
|
||||
hooks:
|
||||
- id: black
|
||||
args: ['--target-version', 'py37', '--skip-string-normalization', '--line-length', '110']
|
||||
args: ['--target-version', 'py39', '--skip-string-normalization', '--line-length', '110']
|
||||
- repo: https://github.com/PyCQA/isort
|
||||
rev: 5.12.0
|
||||
hooks:
|
||||
- id: isort
|
||||
args: ['--profile', 'black', '--line-length', '110']
|
||||
- repo: https://github.com/rtts/djhtml
|
||||
rev: 'v1.5.2'
|
||||
rev: '3.0.5'
|
||||
hooks:
|
||||
- id: djhtml
|
||||
args: ['--tabwidth', '2']
|
||||
|
|
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.)
|
||||
|
|
|
@ -13,7 +13,7 @@ Standards-Version: 3.9.1
|
|||
Package: python3-django-mellon
|
||||
Architecture: all
|
||||
Depends: python3-atomicwrites,
|
||||
python3-django (>= 2:2.2),
|
||||
python3-django (>= 2:3.2),
|
||||
python3-isodate,
|
||||
python3-lasso,
|
||||
${misc:Depends},
|
||||
|
|
|
@ -3,7 +3,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
|
|
@ -5,7 +5,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('mellon', '0001_initial'),
|
||||
]
|
||||
|
|
|
@ -5,7 +5,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('mellon', '0002_sessionindex'),
|
||||
]
|
||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('mellon', '0004_migrate_issuer'),
|
||||
]
|
||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('mellon', '0005_drop_rename_issuer'),
|
||||
]
|
||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('mellon', '0006_nameid_attributes'),
|
||||
]
|
||||
|
|
|
@ -5,7 +5,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('mellon', '0007_sessionindex_transient_name_id'),
|
||||
]
|
||||
|
|
2
setup.py
2
setup.py
|
@ -104,7 +104,7 @@ setup(
|
|||
include_package_data=True,
|
||||
packages=find_packages(),
|
||||
install_requires=[
|
||||
'django>=2.2,<3.3',
|
||||
'django>=3.2,<3.3',
|
||||
'requests',
|
||||
'isodate',
|
||||
'atomicwrites',
|
||||
|
|
|
@ -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