diff --git a/app.py b/app.py index e70603d..f2fd64c 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 2622b9a..ebf72a8 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 5eae17b..f968d72 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 1406ed3..fed63f0 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 66b4d4f..828ee9c 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 fe35456..0bb8c2e 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 8f31446..946aa91 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 055c9fb..87fded9 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 90fbd31..230987e 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 32628df..a962b4d 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 20b95fa..999ffd8 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 92c72ed..e743e47 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 d9ecb45..45b4ad4 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 1c9e1b0..9ac9379 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 fbda146..c821c29 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 63e3d39..9c245f8 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 b8a9286..6d1594d 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 634fe44..636a0fb 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 05c7df0..104a1bd 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 8784028..8bceb50 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 9de7a70..97e4b0e 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 950cd08..cfe64f9 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 3eb1b58..36cafd0 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 17df75a..e4064a0 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 ae7eac9..304b5c6 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 bd86051..79d74b2 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 918e944..f328948 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 e9a1de1..5224476 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 32ffbd9..0c86469 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 f0efef1..d131d8a 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 e2082db..66002be 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 01534f9..3ee25c7 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 ab7c619..eb3d444 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 a63f14e..fc37ccb 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 fcd86c6..6932f82 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 e1261db..945d3a9 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 5720261..5a2d641 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 05802ac..80a86e9 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 2609c6c..e879ed1 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 1265137..caff9be 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