wip/75442-upgrade-hooks #46
|
@ -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.3.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.6'
|
||||
hooks:
|
||||
- id: djhtml
|
||||
args: ['--tabwidth', '2']
|
||||
|
|
2
README
2
README
|
@ -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.)
|
||||
|
|
|
@ -5,7 +5,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = []
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('agendas', '0001_initial'),
|
||||
]
|
||||
|
|
|
@ -3,7 +3,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('agendas', '0002_agenda'),
|
||||
]
|
||||
|
|
|
@ -3,7 +3,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('invoicing', '0001_initial'),
|
||||
('agendas', '0003_check_type_group'),
|
||||
|
|
|
@ -5,7 +5,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('invoicing', '0001_initial'),
|
||||
]
|
||||
|
|
|
@ -17,7 +17,6 @@ sql_forwards = sql_triggers
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('invoicing', '0002_invoice'),
|
||||
]
|
||||
|
|
|
@ -5,7 +5,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('invoicing', '0003_invoice'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('invoicing', '0004_campaign'),
|
||||
]
|
||||
|
|
|
@ -9,7 +9,6 @@ def forward(apps, schema_editor):
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('invoicing', '0005_pool_status'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('invoicing', '0006_pool_status'),
|
||||
]
|
||||
|
|
|
@ -3,7 +3,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('invoicing', '0007_pool_exception'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('invoicing', '0008_injected_line'),
|
||||
]
|
||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('invoicing', '0009_user_name'),
|
||||
]
|
||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('invoicing', '0010_event_date'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('invoicing', '0011_counter'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('invoicing', '0012_counter'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('invoicing', '0013_formatted_number'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('invoicing', '0014_error_status'),
|
||||
]
|
||||
|
|
|
@ -18,7 +18,6 @@ def forward(apps, schema_editor):
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('invoicing', '0015_injected_lines'),
|
||||
]
|
||||
|
|
|
@ -3,7 +3,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('invoicing', '0016_campaign_regie'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('invoicing', '0017_campaign_regie'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('invoicing', '0018_payer'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = []
|
||||
|
|
|
@ -3,7 +3,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('pricing', '0002_pricing'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('pricing', '0003_extra_variables'),
|
||||
]
|
||||
|
|
|
@ -3,7 +3,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('agendas', '0003_check_type_group'),
|
||||
('pricing', '0004_criteria_default'),
|
||||
|
|
|
@ -27,7 +27,6 @@ def backwards(apps, schema_editor):
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('pricing', '0005_agenda_pricing_m2m'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('pricing', '0006_agenda_pricing_m2m'),
|
||||
]
|
||||
|
|
|
@ -14,7 +14,6 @@ def forwards(apps, schema_editor):
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('pricing', '0007_agenda_pricing_slug_and_label'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('pricing', '0008_agenda_pricing_slug_and_label'),
|
||||
]
|
||||
|
|
|
@ -3,7 +3,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('pricing', '0009_agenda_pricing_m2m'),
|
||||
]
|
||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('pricing', '0010_flat_fee_schedule'),
|
||||
]
|
||||
|
|
|
@ -18,7 +18,6 @@ import copy
|
|||
import dataclasses
|
||||
import datetime
|
||||
import decimal
|
||||
from typing import List
|
||||
|
||||
from django.db import models
|
||||
from django.template import Context, RequestContext, Template, TemplateSyntaxError, VariableDoesNotExist
|
||||
|
@ -398,13 +397,13 @@ class PricingMatrixCell:
|
|||
@dataclasses.dataclass
|
||||
class PricingMatrixRow:
|
||||
criteria: Criteria
|
||||
cells: List[PricingMatrixCell]
|
||||
cells: list[PricingMatrixCell]
|
||||
|
||||
|
||||
@dataclasses.dataclass
|
||||
class PricingMatrix:
|
||||
criteria: Criteria
|
||||
rows: List[PricingMatrixRow]
|
||||
rows: list[PricingMatrixRow]
|
||||
|
||||
|
||||
class AgendaPricing(models.Model):
|
||||
|
|
|
@ -113,7 +113,7 @@ WSGI_APPLICATION = 'lingo.wsgi.application'
|
|||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
||||
'ENGINE': 'django.db.backends.postgresql',
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
2
setup.py
2
setup.py
|
@ -160,7 +160,7 @@ setup(
|
|||
'Programming Language :: Python :: 3',
|
||||
],
|
||||
install_requires=[
|
||||
'django>=2.2, <3.3',
|
||||
'django>=3.2, <3.3',
|
||||
'gadjo>=0.53',
|
||||
'requests',
|
||||
'eopayment>=1.60',
|
||||
|
|
|
@ -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],
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue