From f2c8769aa8b487af5abe87e1973f35b5d7d9a8d3 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 01:33:04 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- app.py | 1 + .../versions/2be32221762a_video_check_table.py | 1 + migrations/versions/34935013ab33_initial_build.py | 1 + .../37c20f05bf44_add_action_automate_column.py | 1 + .../3e61825e9188_action_username_foreign_key.py | 1 + .../versions/8271190eec99_action_tag_integration.py | 1 + .../9474e9817305_drop_conflict_constraint.py | 1 + migrations/versions/9542bd4e6db2_add_tag_index.py | 1 + .../f9a298276847_empty_object_as_json_default.py | 1 + tests/models/test_channel.py | 1 + tests/models/test_user.py | 1 + tests/models/test_video.py | 1 + tests/routes/test_main.py | 1 + tests/routes/test_user.py | 1 + tests/test_basics.py | 1 + tests/test_handler.py | 1 + tests/test_hub.py | 1 + tests/test_tasks.py | 1 + tubee/__init__.py | 1 + tubee/forms.py | 1 + tubee/models/__init__.py | 1 + tubee/models/action.py | 1 + tubee/models/callback.py | 1 + tubee/models/channel.py | 1 + tubee/models/notification.py | 1 + tubee/models/subscription.py | 1 + tubee/models/subscription_tag.py | 1 + tubee/models/tag.py | 1 + tubee/models/user.py | 1 + tubee/models/video.py | 1 + tubee/routes/api.py | 1 + tubee/routes/api_task.py | 1 + tubee/routes/main.py | 1 + tubee/routes/user.py | 1 + tubee/static/css/tag_listing.css | 12 ++++++++++-- tubee/tasks.py | 1 + tubee/utils/__init__.py | 1 + tubee/utils/dropbox.py | 1 + tubee/utils/hub.py | 1 + tubee/utils/youtube.py | 1 + 40 files changed, 49 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index e70603de..f2fd64c9 100755 --- a/app.py +++ b/app.py @@ -1,4 +1,5 @@ """Boot Script of Tubee""" + import os from coverage import Coverage diff --git a/migrations/versions/2be32221762a_video_check_table.py b/migrations/versions/2be32221762a_video_check_table.py index 2622b9aa..ebf72a89 100644 --- a/migrations/versions/2be32221762a_video_check_table.py +++ b/migrations/versions/2be32221762a_video_check_table.py @@ -5,6 +5,7 @@ Create Date: 2022-07-09 04:26:06.407841 """ + import sqlalchemy as sa from alembic import op diff --git a/migrations/versions/34935013ab33_initial_build.py b/migrations/versions/34935013ab33_initial_build.py index 5eae17b3..f968d72d 100644 --- a/migrations/versions/34935013ab33_initial_build.py +++ b/migrations/versions/34935013ab33_initial_build.py @@ -5,6 +5,7 @@ Create Date: 2020-03-10 23:05:03.634539 """ + import sqlalchemy as sa from alembic import op diff --git a/migrations/versions/37c20f05bf44_add_action_automate_column.py b/migrations/versions/37c20f05bf44_add_action_automate_column.py index 1406ed3e..fed63f09 100644 --- a/migrations/versions/37c20f05bf44_add_action_automate_column.py +++ b/migrations/versions/37c20f05bf44_add_action_automate_column.py @@ -5,6 +5,7 @@ Create Date: 2022-07-31 15:27:45.040777 """ + import sqlalchemy as sa from alembic import op diff --git a/migrations/versions/3e61825e9188_action_username_foreign_key.py b/migrations/versions/3e61825e9188_action_username_foreign_key.py index 66b4d4f0..828ee9c1 100644 --- a/migrations/versions/3e61825e9188_action_username_foreign_key.py +++ b/migrations/versions/3e61825e9188_action_username_foreign_key.py @@ -5,6 +5,7 @@ Create Date: 2021-01-28 03:12:12.355166 """ + from alembic import op # revision identifiers, used by Alembic. diff --git a/migrations/versions/8271190eec99_action_tag_integration.py b/migrations/versions/8271190eec99_action_tag_integration.py index fe354563..0bb8c2e9 100644 --- a/migrations/versions/8271190eec99_action_tag_integration.py +++ b/migrations/versions/8271190eec99_action_tag_integration.py @@ -5,6 +5,7 @@ Create Date: 2021-01-27 01:43:19.571472 """ + import sqlalchemy as sa from alembic import op diff --git a/migrations/versions/9474e9817305_drop_conflict_constraint.py b/migrations/versions/9474e9817305_drop_conflict_constraint.py index 8f314460..946aa91d 100644 --- a/migrations/versions/9474e9817305_drop_conflict_constraint.py +++ b/migrations/versions/9474e9817305_drop_conflict_constraint.py @@ -5,6 +5,7 @@ Create Date: 2020-03-12 10:21:53.211649 """ + from alembic import op # revision identifiers, used by Alembic. diff --git a/migrations/versions/9542bd4e6db2_add_tag_index.py b/migrations/versions/9542bd4e6db2_add_tag_index.py index 055c9fba..87fded90 100644 --- a/migrations/versions/9542bd4e6db2_add_tag_index.py +++ b/migrations/versions/9542bd4e6db2_add_tag_index.py @@ -5,6 +5,7 @@ Create Date: 2022-11-22 02:43:42.004723 """ + import sqlalchemy as sa from alembic import op diff --git a/migrations/versions/f9a298276847_empty_object_as_json_default.py b/migrations/versions/f9a298276847_empty_object_as_json_default.py index 90fbd31b..230987e1 100644 --- a/migrations/versions/f9a298276847_empty_object_as_json_default.py +++ b/migrations/versions/f9a298276847_empty_object_as_json_default.py @@ -5,6 +5,7 @@ Create Date: 2021-06-14 11:27:10.424903 """ + import sqlalchemy as sa from alembic import op from sqlalchemy.dialects import postgresql diff --git a/tests/models/test_channel.py b/tests/models/test_channel.py index 32628df7..a962b4df 100644 --- a/tests/models/test_channel.py +++ b/tests/models/test_channel.py @@ -1,4 +1,5 @@ """Test Cases of Channel Model""" + import json import unittest from datetime import datetime, timezone diff --git a/tests/models/test_user.py b/tests/models/test_user.py index 20b95fa7..999ffd8a 100644 --- a/tests/models/test_user.py +++ b/tests/models/test_user.py @@ -1,4 +1,5 @@ """Test Cases of User Model""" + import unittest from unittest import mock diff --git a/tests/models/test_video.py b/tests/models/test_video.py index 92c72ed4..e743e471 100644 --- a/tests/models/test_video.py +++ b/tests/models/test_video.py @@ -1,4 +1,5 @@ """Test Cases of Video Model""" + import unittest from unittest import mock diff --git a/tests/routes/test_main.py b/tests/routes/test_main.py index d9ecb450..45b4ad46 100644 --- a/tests/routes/test_main.py +++ b/tests/routes/test_main.py @@ -1,4 +1,5 @@ """Test Cases of Main Routes""" + import unittest from tubee import create_app, db diff --git a/tests/routes/test_user.py b/tests/routes/test_user.py index 1c9e1b09..9ac93799 100644 --- a/tests/routes/test_user.py +++ b/tests/routes/test_user.py @@ -1,4 +1,5 @@ """Test Cases of User Routes""" + import unittest from tubee import create_app, db, login_manager diff --git a/tests/test_basics.py b/tests/test_basics.py index fbda146c..c821c292 100644 --- a/tests/test_basics.py +++ b/tests/test_basics.py @@ -1,4 +1,5 @@ """Test Cases of App Basics""" + import unittest from flask import current_app diff --git a/tests/test_handler.py b/tests/test_handler.py index 63e3d39e..9c245f8e 100644 --- a/tests/test_handler.py +++ b/tests/test_handler.py @@ -1,4 +1,5 @@ """Test Cases of App Basics""" + import unittest from tubee import create_app, db diff --git a/tests/test_hub.py b/tests/test_hub.py index b8a92869..6d1594d3 100644 --- a/tests/test_hub.py +++ b/tests/test_hub.py @@ -1,4 +1,5 @@ """Test Cases of utils.hub""" + import unittest import uuid from os.path import dirname, join diff --git a/tests/test_tasks.py b/tests/test_tasks.py index 634fe443..636a0fb1 100644 --- a/tests/test_tasks.py +++ b/tests/test_tasks.py @@ -1,4 +1,5 @@ """Test Cases of Celery Tasks""" + import unittest from unittest import mock diff --git a/tubee/__init__.py b/tubee/__init__.py index 05c7df0c..104a1bd6 100644 --- a/tubee/__init__.py +++ b/tubee/__init__.py @@ -1,4 +1,5 @@ """Main Application of Tubee""" + import logging from typing import Union diff --git a/tubee/forms.py b/tubee/forms.py index 8784028d..8bceb50a 100644 --- a/tubee/forms.py +++ b/tubee/forms.py @@ -1,4 +1,5 @@ """Forms""" + from flask_wtf import FlaskForm from wtforms.fields import ( BooleanField, diff --git a/tubee/models/__init__.py b/tubee/models/__init__.py index 9de7a705..97e4b0ee 100644 --- a/tubee/models/__init__.py +++ b/tubee/models/__init__.py @@ -2,6 +2,7 @@ Collect models for import """ + # flake8: noqa from .action import Action, ActionType from .callback import Callback diff --git a/tubee/models/action.py b/tubee/models/action.py index 950cd08e..cfe64f9f 100644 --- a/tubee/models/action.py +++ b/tubee/models/action.py @@ -1,4 +1,5 @@ """Action Model""" + from dataclasses import dataclass from enum import Enum from typing import Union diff --git a/tubee/models/callback.py b/tubee/models/callback.py index 3eb1b586..36cafd0d 100644 --- a/tubee/models/callback.py +++ b/tubee/models/callback.py @@ -1,4 +1,5 @@ """Callback Model""" + from dataclasses import dataclass from datetime import datetime diff --git a/tubee/models/channel.py b/tubee/models/channel.py index 17df75a8..e4064a04 100644 --- a/tubee/models/channel.py +++ b/tubee/models/channel.py @@ -1,4 +1,5 @@ """Channel Model""" + from dataclasses import dataclass from datetime import datetime, timedelta from urllib.parse import urlencode diff --git a/tubee/models/notification.py b/tubee/models/notification.py index ae7eac92..304b5c65 100644 --- a/tubee/models/notification.py +++ b/tubee/models/notification.py @@ -1,4 +1,5 @@ """Notification Model""" + from dataclasses import dataclass from datetime import datetime from enum import Enum diff --git a/tubee/models/subscription.py b/tubee/models/subscription.py index bd860510..79d74b23 100644 --- a/tubee/models/subscription.py +++ b/tubee/models/subscription.py @@ -1,4 +1,5 @@ """Subscription Model""" + from dataclasses import dataclass from datetime import datetime diff --git a/tubee/models/subscription_tag.py b/tubee/models/subscription_tag.py index 918e9440..f3289486 100644 --- a/tubee/models/subscription_tag.py +++ b/tubee/models/subscription_tag.py @@ -1,4 +1,5 @@ """SubscriptionTag Model""" + from dataclasses import dataclass from .. import db diff --git a/tubee/models/tag.py b/tubee/models/tag.py index e9a1de11..5224476a 100644 --- a/tubee/models/tag.py +++ b/tubee/models/tag.py @@ -1,4 +1,5 @@ """Tag Model""" + from dataclasses import dataclass from loguru import logger diff --git a/tubee/models/user.py b/tubee/models/user.py index 32ffbd99..0c864696 100644 --- a/tubee/models/user.py +++ b/tubee/models/user.py @@ -1,4 +1,5 @@ """User Model""" + import json from dataclasses import dataclass diff --git a/tubee/models/video.py b/tubee/models/video.py index f0efef11..d131d8a7 100644 --- a/tubee/models/video.py +++ b/tubee/models/video.py @@ -1,4 +1,5 @@ """Video Model""" + from dataclasses import dataclass from datetime import datetime from typing import Union diff --git a/tubee/routes/api.py b/tubee/routes/api.py index e2082db7..66002bea 100644 --- a/tubee/routes/api.py +++ b/tubee/routes/api.py @@ -1,4 +1,5 @@ """API for Frontend Access""" + from flask import Blueprint from flask_login import current_user, login_required diff --git a/tubee/routes/api_task.py b/tubee/routes/api_task.py index 01534f90..3ee25c72 100644 --- a/tubee/routes/api_task.py +++ b/tubee/routes/api_task.py @@ -1,4 +1,5 @@ """API for Tasks""" + from flask import Blueprint, jsonify from flask_login import login_required diff --git a/tubee/routes/main.py b/tubee/routes/main.py index ab7c6194..eb3d4448 100644 --- a/tubee/routes/main.py +++ b/tubee/routes/main.py @@ -1,4 +1,5 @@ """The Main Routes""" + import bs4 from flask import Blueprint, jsonify, render_template, request from flask_login import current_user # type: ignore diff --git a/tubee/routes/user.py b/tubee/routes/user.py index a63f14ed..fc37ccb4 100644 --- a/tubee/routes/user.py +++ b/tubee/routes/user.py @@ -1,4 +1,5 @@ """Routes involves user credentials""" + from dropbox.oauth import ( BadRequestException, BadStateException, diff --git a/tubee/static/css/tag_listing.css b/tubee/static/css/tag_listing.css index fcd86c65..6932f822 100644 --- a/tubee/static/css/tag_listing.css +++ b/tubee/static/css/tag_listing.css @@ -3,9 +3,17 @@ linear-gradient(to right, white, white), linear-gradient(to right, rgba(0, 0, 0, 0.25), rgba(255, 255, 255, 0)), linear-gradient(to left, rgba(0, 0, 0, 0.25), rgba(255, 255, 255, 0)); - background-position: left center, right center, left center, right center; + background-position: + left center, + right center, + left center, + right center; background-repeat: no-repeat; - background-size: 20px 100%, 20px 100%, 10px 100%, 10px 100%; + background-size: + 20px 100%, + 20px 100%, + 10px 100%, + 10px 100%; background-attachment: local, local, scroll, scroll; scrollbar-width: none; /* Firefox */ } diff --git a/tubee/tasks.py b/tubee/tasks.py index e1261db2..945d3a96 100644 --- a/tubee/tasks.py +++ b/tubee/tasks.py @@ -1,4 +1,5 @@ """Defines All Async Task for Celery""" + from datetime import datetime from enum import Enum from random import randrange diff --git a/tubee/utils/__init__.py b/tubee/utils/__init__.py index 5720261a..5a2d641c 100644 --- a/tubee/utils/__init__.py +++ b/tubee/utils/__init__.py @@ -2,6 +2,7 @@ Some Misc Functions used in this app """ + import logging import secrets import string diff --git a/tubee/utils/dropbox.py b/tubee/utils/dropbox.py index 05802ac5..80a86e96 100644 --- a/tubee/utils/dropbox.py +++ b/tubee/utils/dropbox.py @@ -1,4 +1,5 @@ """Dropbox Related Functions""" + import dropbox from flask import current_app, url_for diff --git a/tubee/utils/hub.py b/tubee/utils/hub.py index 2609c6c8..e879ed1f 100644 --- a/tubee/utils/hub.py +++ b/tubee/utils/hub.py @@ -12,6 +12,7 @@ REQUIRED_PARAMETERS {list} -- A list of required parameters to compsoe request to hub """ + import re from urllib.parse import urljoin, urlparse diff --git a/tubee/utils/youtube.py b/tubee/utils/youtube.py index 12651375..caff9bec 100644 --- a/tubee/utils/youtube.py +++ b/tubee/utils/youtube.py @@ -1,4 +1,5 @@ """YouTube Data API Functions""" + import json from typing import Union