Add pre-commit hooks

This commit is contained in:
Edgar P. Burkhart 2023-04-18 18:55:23 +02:00
parent 6ed05ad33d
commit d0cfc2d729
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
24 changed files with 13 additions and 29 deletions

10
.pre-commit-config.yaml Normal file
View file

@ -0,0 +1,10 @@
repos:
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black

View file

@ -10,7 +10,6 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
initial = True initial = True
dependencies = [] dependencies = []

View file

@ -4,7 +4,6 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
("main", "0001_initial"), ("main", "0001_initial"),
] ]

View file

@ -4,7 +4,6 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
("main", "0002_alter_snapshot_date_alter_snapshot_diff"), ("main", "0002_alter_snapshot_date_alter_snapshot_diff"),
] ]

View file

@ -4,7 +4,6 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
("main", "0003_transaction_real_date"), ("main", "0003_transaction_real_date"),
] ]

View file

@ -4,7 +4,6 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
("main", "0004_transaction_payment"), ("main", "0004_transaction_payment"),
] ]

View file

@ -8,7 +8,6 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
("main", "0005_alter_category_name"), ("main", "0005_alter_category_name"),
] ]

View file

@ -7,7 +7,6 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
("main", "0006_alter_category_options_alter_invoice_options_and_more"), ("main", "0006_alter_category_options_alter_invoice_options_and_more"),
] ]

View file

@ -5,7 +5,6 @@ from django.db import migrations
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
("main", "0007_snapshot_file_alter_invoice_file_alter_snapshot_date"), ("main", "0007_snapshot_file_alter_invoice_file_alter_snapshot_date"),
] ]

View file

@ -2,13 +2,11 @@
import django.core.validators import django.core.validators
import django.db.models.deletion import django.db.models.deletion
from django.db import migrations, models
import main.models import main.models
from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
("main", "0008_auto_20221221_1657"), ("main", "0008_auto_20221221_1657"),
] ]

View file

@ -6,7 +6,6 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL), migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("main", "0009_alter_invoice_file_alter_invoice_transaction_and_more"), ("main", "0009_alter_invoice_file_alter_invoice_transaction_and_more"),

View file

@ -6,7 +6,6 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL), migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("main", "0010_category_user_invoice_user_snapshot_user_and_more"), ("main", "0010_category_user_invoice_user_snapshot_user_and_more"),

View file

@ -6,7 +6,6 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
("main", "0011_alter_category_user_alter_invoice_user_and_more"), ("main", "0011_alter_category_user_alter_invoice_user_and_more"),
] ]

View file

@ -8,7 +8,6 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL), migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("main", "0012_alter_snapshot_date"), ("main", "0012_alter_snapshot_date"),

View file

@ -4,7 +4,6 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
("main", "0013_account_snapshot_account_transaction_account"), ("main", "0013_account_snapshot_account_transaction_account"),
] ]

View file

@ -7,7 +7,6 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
("main", "0014_alter_account_icon"), ("main", "0014_alter_account_icon"),
] ]

View file

@ -15,7 +15,6 @@ def set_snapshot(apps, schema_editor):
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
("main", "0015_alter_snapshot_options_remove_snapshot_diff_and_more"), ("main", "0015_alter_snapshot_options_remove_snapshot_diff_and_more"),
] ]

View file

@ -5,7 +5,6 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
("main", "0017_alter_transaction_account"), ("main", "0017_alter_transaction_account"),
] ]

View file

@ -4,7 +4,6 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
("main", "0018_snapshot_diff_alter_snapshot_account"), ("main", "0018_snapshot_diff_alter_snapshot_account"),
] ]

View file

@ -9,7 +9,6 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
("main", "0019_snapshot_sum"), ("main", "0019_snapshot_sum"),
] ]

View file

@ -5,14 +5,12 @@ import re
import django.core.validators import django.core.validators
import django.db.models.deletion import django.db.models.deletion
import main.models
from django.conf import settings from django.conf import settings
from django.db import migrations, models from django.db import migrations, models
import main.models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL), migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("main", "0020_alter_account_options_alter_snapshot_options_and_more"), ("main", "0020_alter_account_options_alter_snapshot_options_and_more"),

View file

@ -4,7 +4,6 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
("main", "0021_alter_account_options_alter_category_options_and_more"), ("main", "0021_alter_account_options_alter_category_options_and_more"),
] ]

View file

@ -2,11 +2,10 @@
import pathlib import pathlib
import main.models
from django.conf import settings from django.conf import settings
from django.db import migrations from django.db import migrations
import main.models
def move_files(apps, schema_editor): def move_files(apps, schema_editor):
Invoice = apps.get_model("main", "Invoice") Invoice = apps.get_model("main", "Invoice")
@ -49,7 +48,6 @@ def move_files(apps, schema_editor):
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
("main", "0022_alter_account_icon_alter_category_icon"), ("main", "0022_alter_account_icon_alter_category_icon"),
] ]

View file

@ -4,7 +4,6 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
("main", "0023_auto_20221231_1741"), ("main", "0023_auto_20221231_1741"),
] ]