From d0cfc2d729eaa5591e917a7b35f0b547162c2f8c Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Tue, 18 Apr 2023 18:55:23 +0200 Subject: [PATCH] Add pre-commit hooks --- .pre-commit-config.yaml | 10 ++++++++++ nummi/main/migrations/0001_initial.py | 1 - .../0002_alter_snapshot_date_alter_snapshot_diff.py | 1 - nummi/main/migrations/0003_transaction_real_date.py | 1 - nummi/main/migrations/0004_transaction_payment.py | 1 - nummi/main/migrations/0005_alter_category_name.py | 1 - ..._category_options_alter_invoice_options_and_more.py | 1 - ...shot_file_alter_invoice_file_alter_snapshot_date.py | 1 - nummi/main/migrations/0008_auto_20221221_1657.py | 1 - ..._invoice_file_alter_invoice_transaction_and_more.py | 4 +--- ...ategory_user_invoice_user_snapshot_user_and_more.py | 1 - ..._alter_category_user_alter_invoice_user_and_more.py | 1 - nummi/main/migrations/0012_alter_snapshot_date.py | 1 - ...013_account_snapshot_account_transaction_account.py | 1 - nummi/main/migrations/0014_alter_account_icon.py | 1 - ...r_snapshot_options_remove_snapshot_diff_and_more.py | 1 - ...r_transaction_account_alter_transaction_snapshot.py | 1 - .../0018_snapshot_diff_alter_snapshot_account.py | 1 - nummi/main/migrations/0019_snapshot_sum.py | 1 - ..._account_options_alter_snapshot_options_and_more.py | 1 - ..._account_options_alter_category_options_and_more.py | 4 +--- .../0022_alter_account_icon_alter_category_icon.py | 1 - nummi/main/migrations/0023_auto_20221231_1741.py | 4 +--- nummi/main/migrations/0024_account_default.py | 1 - 24 files changed, 13 insertions(+), 29 deletions(-) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..34ecda0 --- /dev/null +++ b/.pre-commit-config.yaml @@ -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 diff --git a/nummi/main/migrations/0001_initial.py b/nummi/main/migrations/0001_initial.py index fae77ef..c6dcd3e 100644 --- a/nummi/main/migrations/0001_initial.py +++ b/nummi/main/migrations/0001_initial.py @@ -10,7 +10,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - initial = True dependencies = [] diff --git a/nummi/main/migrations/0002_alter_snapshot_date_alter_snapshot_diff.py b/nummi/main/migrations/0002_alter_snapshot_date_alter_snapshot_diff.py index 2753a1d..e1cf52e 100644 --- a/nummi/main/migrations/0002_alter_snapshot_date_alter_snapshot_diff.py +++ b/nummi/main/migrations/0002_alter_snapshot_date_alter_snapshot_diff.py @@ -4,7 +4,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("main", "0001_initial"), ] diff --git a/nummi/main/migrations/0003_transaction_real_date.py b/nummi/main/migrations/0003_transaction_real_date.py index dfa0a25..ba6c620 100644 --- a/nummi/main/migrations/0003_transaction_real_date.py +++ b/nummi/main/migrations/0003_transaction_real_date.py @@ -4,7 +4,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("main", "0002_alter_snapshot_date_alter_snapshot_diff"), ] diff --git a/nummi/main/migrations/0004_transaction_payment.py b/nummi/main/migrations/0004_transaction_payment.py index f613d7e..58f807f 100644 --- a/nummi/main/migrations/0004_transaction_payment.py +++ b/nummi/main/migrations/0004_transaction_payment.py @@ -4,7 +4,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("main", "0003_transaction_real_date"), ] diff --git a/nummi/main/migrations/0005_alter_category_name.py b/nummi/main/migrations/0005_alter_category_name.py index b88b522..58eb9cf 100644 --- a/nummi/main/migrations/0005_alter_category_name.py +++ b/nummi/main/migrations/0005_alter_category_name.py @@ -4,7 +4,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("main", "0004_transaction_payment"), ] diff --git a/nummi/main/migrations/0006_alter_category_options_alter_invoice_options_and_more.py b/nummi/main/migrations/0006_alter_category_options_alter_invoice_options_and_more.py index e0bf69d..0e01761 100644 --- a/nummi/main/migrations/0006_alter_category_options_alter_invoice_options_and_more.py +++ b/nummi/main/migrations/0006_alter_category_options_alter_invoice_options_and_more.py @@ -8,7 +8,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("main", "0005_alter_category_name"), ] diff --git a/nummi/main/migrations/0007_snapshot_file_alter_invoice_file_alter_snapshot_date.py b/nummi/main/migrations/0007_snapshot_file_alter_invoice_file_alter_snapshot_date.py index 5a24ab9..ae9f88a 100644 --- a/nummi/main/migrations/0007_snapshot_file_alter_invoice_file_alter_snapshot_date.py +++ b/nummi/main/migrations/0007_snapshot_file_alter_invoice_file_alter_snapshot_date.py @@ -7,7 +7,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("main", "0006_alter_category_options_alter_invoice_options_and_more"), ] diff --git a/nummi/main/migrations/0008_auto_20221221_1657.py b/nummi/main/migrations/0008_auto_20221221_1657.py index 8174089..d4329b0 100644 --- a/nummi/main/migrations/0008_auto_20221221_1657.py +++ b/nummi/main/migrations/0008_auto_20221221_1657.py @@ -5,7 +5,6 @@ from django.db import migrations class Migration(migrations.Migration): - dependencies = [ ("main", "0007_snapshot_file_alter_invoice_file_alter_snapshot_date"), ] diff --git a/nummi/main/migrations/0009_alter_invoice_file_alter_invoice_transaction_and_more.py b/nummi/main/migrations/0009_alter_invoice_file_alter_invoice_transaction_and_more.py index 64f47f1..bcd7bb8 100644 --- a/nummi/main/migrations/0009_alter_invoice_file_alter_invoice_transaction_and_more.py +++ b/nummi/main/migrations/0009_alter_invoice_file_alter_invoice_transaction_and_more.py @@ -2,13 +2,11 @@ import django.core.validators import django.db.models.deletion -from django.db import migrations, models - import main.models +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("main", "0008_auto_20221221_1657"), ] diff --git a/nummi/main/migrations/0010_category_user_invoice_user_snapshot_user_and_more.py b/nummi/main/migrations/0010_category_user_invoice_user_snapshot_user_and_more.py index 089718d..35d701e 100644 --- a/nummi/main/migrations/0010_category_user_invoice_user_snapshot_user_and_more.py +++ b/nummi/main/migrations/0010_category_user_invoice_user_snapshot_user_and_more.py @@ -6,7 +6,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ("main", "0009_alter_invoice_file_alter_invoice_transaction_and_more"), diff --git a/nummi/main/migrations/0011_alter_category_user_alter_invoice_user_and_more.py b/nummi/main/migrations/0011_alter_category_user_alter_invoice_user_and_more.py index a8b63b0..b1743b5 100644 --- a/nummi/main/migrations/0011_alter_category_user_alter_invoice_user_and_more.py +++ b/nummi/main/migrations/0011_alter_category_user_alter_invoice_user_and_more.py @@ -6,7 +6,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ("main", "0010_category_user_invoice_user_snapshot_user_and_more"), diff --git a/nummi/main/migrations/0012_alter_snapshot_date.py b/nummi/main/migrations/0012_alter_snapshot_date.py index 09fed66..c702f8c 100644 --- a/nummi/main/migrations/0012_alter_snapshot_date.py +++ b/nummi/main/migrations/0012_alter_snapshot_date.py @@ -6,7 +6,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("main", "0011_alter_category_user_alter_invoice_user_and_more"), ] diff --git a/nummi/main/migrations/0013_account_snapshot_account_transaction_account.py b/nummi/main/migrations/0013_account_snapshot_account_transaction_account.py index d4a0e82..3568270 100644 --- a/nummi/main/migrations/0013_account_snapshot_account_transaction_account.py +++ b/nummi/main/migrations/0013_account_snapshot_account_transaction_account.py @@ -8,7 +8,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ("main", "0012_alter_snapshot_date"), diff --git a/nummi/main/migrations/0014_alter_account_icon.py b/nummi/main/migrations/0014_alter_account_icon.py index f339f34..0af2113 100644 --- a/nummi/main/migrations/0014_alter_account_icon.py +++ b/nummi/main/migrations/0014_alter_account_icon.py @@ -4,7 +4,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("main", "0013_account_snapshot_account_transaction_account"), ] diff --git a/nummi/main/migrations/0015_alter_snapshot_options_remove_snapshot_diff_and_more.py b/nummi/main/migrations/0015_alter_snapshot_options_remove_snapshot_diff_and_more.py index b19e22b..6507b6e 100644 --- a/nummi/main/migrations/0015_alter_snapshot_options_remove_snapshot_diff_and_more.py +++ b/nummi/main/migrations/0015_alter_snapshot_options_remove_snapshot_diff_and_more.py @@ -7,7 +7,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("main", "0014_alter_account_icon"), ] diff --git a/nummi/main/migrations/0016_alter_transaction_account_alter_transaction_snapshot.py b/nummi/main/migrations/0016_alter_transaction_account_alter_transaction_snapshot.py index bf3f148..76d037f 100644 --- a/nummi/main/migrations/0016_alter_transaction_account_alter_transaction_snapshot.py +++ b/nummi/main/migrations/0016_alter_transaction_account_alter_transaction_snapshot.py @@ -15,7 +15,6 @@ def set_snapshot(apps, schema_editor): class Migration(migrations.Migration): - dependencies = [ ("main", "0015_alter_snapshot_options_remove_snapshot_diff_and_more"), ] diff --git a/nummi/main/migrations/0018_snapshot_diff_alter_snapshot_account.py b/nummi/main/migrations/0018_snapshot_diff_alter_snapshot_account.py index 2f40d1e..bd4a699 100644 --- a/nummi/main/migrations/0018_snapshot_diff_alter_snapshot_account.py +++ b/nummi/main/migrations/0018_snapshot_diff_alter_snapshot_account.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("main", "0017_alter_transaction_account"), ] diff --git a/nummi/main/migrations/0019_snapshot_sum.py b/nummi/main/migrations/0019_snapshot_sum.py index 6a6cf87..01de184 100644 --- a/nummi/main/migrations/0019_snapshot_sum.py +++ b/nummi/main/migrations/0019_snapshot_sum.py @@ -4,7 +4,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("main", "0018_snapshot_diff_alter_snapshot_account"), ] diff --git a/nummi/main/migrations/0020_alter_account_options_alter_snapshot_options_and_more.py b/nummi/main/migrations/0020_alter_account_options_alter_snapshot_options_and_more.py index 04233eb..4939143 100644 --- a/nummi/main/migrations/0020_alter_account_options_alter_snapshot_options_and_more.py +++ b/nummi/main/migrations/0020_alter_account_options_alter_snapshot_options_and_more.py @@ -9,7 +9,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("main", "0019_snapshot_sum"), ] diff --git a/nummi/main/migrations/0021_alter_account_options_alter_category_options_and_more.py b/nummi/main/migrations/0021_alter_account_options_alter_category_options_and_more.py index ce56899..e428be0 100644 --- a/nummi/main/migrations/0021_alter_account_options_alter_category_options_and_more.py +++ b/nummi/main/migrations/0021_alter_account_options_alter_category_options_and_more.py @@ -5,14 +5,12 @@ import re import django.core.validators import django.db.models.deletion +import main.models from django.conf import settings from django.db import migrations, models -import main.models - class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ("main", "0020_alter_account_options_alter_snapshot_options_and_more"), diff --git a/nummi/main/migrations/0022_alter_account_icon_alter_category_icon.py b/nummi/main/migrations/0022_alter_account_icon_alter_category_icon.py index e81300f..0823f19 100644 --- a/nummi/main/migrations/0022_alter_account_icon_alter_category_icon.py +++ b/nummi/main/migrations/0022_alter_account_icon_alter_category_icon.py @@ -4,7 +4,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("main", "0021_alter_account_options_alter_category_options_and_more"), ] diff --git a/nummi/main/migrations/0023_auto_20221231_1741.py b/nummi/main/migrations/0023_auto_20221231_1741.py index 2c4932f..a8a2aaf 100644 --- a/nummi/main/migrations/0023_auto_20221231_1741.py +++ b/nummi/main/migrations/0023_auto_20221231_1741.py @@ -2,11 +2,10 @@ import pathlib +import main.models from django.conf import settings from django.db import migrations -import main.models - def move_files(apps, schema_editor): Invoice = apps.get_model("main", "Invoice") @@ -49,7 +48,6 @@ def move_files(apps, schema_editor): class Migration(migrations.Migration): - dependencies = [ ("main", "0022_alter_account_icon_alter_category_icon"), ] diff --git a/nummi/main/migrations/0024_account_default.py b/nummi/main/migrations/0024_account_default.py index 89665b7..61a62c2 100644 --- a/nummi/main/migrations/0024_account_default.py +++ b/nummi/main/migrations/0024_account_default.py @@ -4,7 +4,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("main", "0023_auto_20221231_1741"), ]