From d17b44adbafb512ef8a2309a7af4da18414227d5 Mon Sep 17 00:00:00 2001 From: Federico Fantini Date: Wed, 9 Aug 2023 16:56:08 +0200 Subject: [PATCH] executed command pre-commit on all files --- .flake8 | 15 ++++++++++----- .../apps/feedback/migrations/0001_initial.py | 1 - .../apps/notifications/migrations/0001_initial.py | 1 - .../migrations/0002_alter_notification_appname.py | 1 - .../notifications/migrations/0003_for_user.py | 1 - .../apps/organization/migrations/0001_initial.py | 1 - .../apps/payments/migrations/0001_initial.py | 1 - certego_saas/apps/user/migrations/0001_initial.py | 1 - .../ext/test_utilities/no_logs_test_case.py | 1 - certego_saas/ext/upload/elastic.py | 1 - certego_saas/ext/upload/slack.py | 2 -- certego_saas/ext/upload/twitter.py | 2 -- 12 files changed, 10 insertions(+), 18 deletions(-) diff --git a/.flake8 b/.flake8 index 32a28b4..a5d6e04 100644 --- a/.flake8 +++ b/.flake8 @@ -9,8 +9,13 @@ exclude = certego_django_apps/migrations example_project ignore = - F821, # undefined name 'Rule' - W503, # line break before binary operator - E402, # module level import not at top of file - W291, # trailing whitespace nightmare - E203, # whitespace before ':' \ No newline at end of file + # undefined name 'Rule' + F821, + # line break before binary operator + W503, + # module level import not at top of file + E402, + # trailing whitespace nightmare + W291, + # whitespace before ':' + E203, \ No newline at end of file diff --git a/certego_saas/apps/feedback/migrations/0001_initial.py b/certego_saas/apps/feedback/migrations/0001_initial.py index 4510a21..8a40deb 100644 --- a/certego_saas/apps/feedback/migrations/0001_initial.py +++ b/certego_saas/apps/feedback/migrations/0001_initial.py @@ -6,7 +6,6 @@ class Migration(migrations.Migration): - initial = True dependencies = [ diff --git a/certego_saas/apps/notifications/migrations/0001_initial.py b/certego_saas/apps/notifications/migrations/0001_initial.py index 2e11f79..2c60618 100644 --- a/certego_saas/apps/notifications/migrations/0001_initial.py +++ b/certego_saas/apps/notifications/migrations/0001_initial.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - initial = True dependencies = [ diff --git a/certego_saas/apps/notifications/migrations/0002_alter_notification_appname.py b/certego_saas/apps/notifications/migrations/0002_alter_notification_appname.py index f44db4a..0ac5ab1 100644 --- a/certego_saas/apps/notifications/migrations/0002_alter_notification_appname.py +++ b/certego_saas/apps/notifications/migrations/0002_alter_notification_appname.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("certego_saas_notifications", "0001_initial"), ] diff --git a/certego_saas/apps/notifications/migrations/0003_for_user.py b/certego_saas/apps/notifications/migrations/0003_for_user.py index 944b645..94843a0 100644 --- a/certego_saas/apps/notifications/migrations/0003_for_user.py +++ b/certego_saas/apps/notifications/migrations/0003_for_user.py @@ -3,7 +3,6 @@ class Migration(migrations.Migration): - dependencies = [ ("certego_saas_notifications", "0002_alter_notification_appname"), ] diff --git a/certego_saas/apps/organization/migrations/0001_initial.py b/certego_saas/apps/organization/migrations/0001_initial.py index 5118614..0f00b6a 100644 --- a/certego_saas/apps/organization/migrations/0001_initial.py +++ b/certego_saas/apps/organization/migrations/0001_initial.py @@ -6,7 +6,6 @@ class Migration(migrations.Migration): - initial = True dependencies = [ diff --git a/certego_saas/apps/payments/migrations/0001_initial.py b/certego_saas/apps/payments/migrations/0001_initial.py index 703089e..4beaae8 100644 --- a/certego_saas/apps/payments/migrations/0001_initial.py +++ b/certego_saas/apps/payments/migrations/0001_initial.py @@ -6,7 +6,6 @@ class Migration(migrations.Migration): - initial = True dependencies = [ diff --git a/certego_saas/apps/user/migrations/0001_initial.py b/certego_saas/apps/user/migrations/0001_initial.py index aa7d2d5..075511d 100644 --- a/certego_saas/apps/user/migrations/0001_initial.py +++ b/certego_saas/apps/user/migrations/0001_initial.py @@ -7,7 +7,6 @@ class Migration(migrations.Migration): - initial = True replaces = [ ("certego_saas", "0001_initial"), diff --git a/certego_saas/ext/test_utilities/no_logs_test_case.py b/certego_saas/ext/test_utilities/no_logs_test_case.py index 4a13c84..c8acb61 100644 --- a/certego_saas/ext/test_utilities/no_logs_test_case.py +++ b/certego_saas/ext/test_utilities/no_logs_test_case.py @@ -19,7 +19,6 @@ def assertNoLogs( with self.assertLogs(logger=logger, level=level) as new_log: yield except AssertionError as e: - if isinstance(e.args[0], str) and not e.args[0].startswith( "no logs of level" ): diff --git a/certego_saas/ext/upload/elastic.py b/certego_saas/ext/upload/elastic.py index 765a051..b9fa996 100644 --- a/certego_saas/ext/upload/elastic.py +++ b/certego_saas/ext/upload/elastic.py @@ -72,7 +72,6 @@ def __repr__(self): from django.db.models import fields as django_fields class BIDocument(__BIDocumentInterface, Model): - index = django_fields.CharField(max_length=100) creation_date = django_fields.DateTimeField(auto_now_add=True) category = django_fields.CharField(max_length=100) diff --git a/certego_saas/ext/upload/slack.py b/certego_saas/ext/upload/slack.py index 1402de8..84eb1cc 100644 --- a/certego_saas/ext/upload/slack.py +++ b/certego_saas/ext/upload/slack.py @@ -29,13 +29,11 @@ def send_message( if settings.DEBUG or certego_apps_settings.TESTING: - Slack = _Slack else: class Slack(_Slack): - token = settings.SLACK_TOKEN client = WebClient(token=token) diff --git a/certego_saas/ext/upload/twitter.py b/certego_saas/ext/upload/twitter.py index 6439ad8..e61c759 100644 --- a/certego_saas/ext/upload/twitter.py +++ b/certego_saas/ext/upload/twitter.py @@ -53,13 +53,11 @@ def post_tweet( if settings.DEBUG or certego_apps_settings.TESTING: - Twitter = _Twitter else: class Twitter(_Twitter): - CHARACTER_LIMIT = twitter_lib.api.CHARACTER_LIMIT client = twitter_lib.Api( consumer_key=certego_apps_settings.TWITTER_CONSUMER_KEY,