diff --git a/resolvers/__init__.py b/resolvers/__init__.py index 41e40d03..dd22ecb7 100644 --- a/resolvers/__init__.py +++ b/resolvers/__init__.py @@ -1,52 +1,24 @@ -from resolvers.author import ( - get_author, - get_author_followers, - get_author_follows, - get_author_follows_authors, - get_author_follows_topics, - get_author_id, - get_authors_all, - load_authors_by, - search_authors, - update_author, -) +from resolvers.author import (get_author, get_author_followers, + get_author_follows, get_author_follows_authors, + get_author_follows_topics, get_author_id, + get_authors_all, load_authors_by, search_authors, + update_author) from resolvers.community import get_communities_all, get_community from resolvers.editor import create_shout, delete_shout, update_shout -from resolvers.follower import ( - follow, - get_shout_followers, - get_topic_followers, - unfollow, -) -from resolvers.notifier import ( - load_notifications, - notification_mark_seen, - notifications_seen_after, - notifications_seen_thread, -) +from resolvers.follower import (follow, get_shout_followers, + get_topic_followers, unfollow) +from resolvers.notifier import (load_notifications, notification_mark_seen, + notifications_seen_after, + notifications_seen_thread) from resolvers.rating import rate_author -from resolvers.reaction import ( - create_reaction, - delete_reaction, - load_reactions_by, - load_shouts_followed, - update_reaction, -) -from resolvers.reader import ( - get_shout, - load_shouts_by, - load_shouts_feed, - load_shouts_random_top, - load_shouts_random_topic, - load_shouts_search, - load_shouts_unrated, -) -from resolvers.topic import ( - get_topic, - get_topics_all, - get_topics_by_author, - get_topics_by_community, -) +from resolvers.reaction import (create_reaction, delete_reaction, + load_reactions_by, load_shouts_followed, + update_reaction) +from resolvers.reader import (get_shout, load_shouts_by, load_shouts_feed, + load_shouts_random_top, load_shouts_random_topic, + load_shouts_search, load_shouts_unrated) +from resolvers.topic import (get_topic, get_topics_all, get_topics_by_author, + get_topics_by_community) from services.triggers import events_register events_register() diff --git a/resolvers/author.py b/resolvers/author.py index 04993b62..fdadb4a7 100644 --- a/resolvers/author.py +++ b/resolvers/author.py @@ -8,7 +8,8 @@ from sqlalchemy_searchable import search from orm.author import Author, AuthorFollower from orm.shout import ShoutAuthor, ShoutTopic from orm.topic import Topic -from resolvers.stat import author_follows_authors, author_follows_topics, get_with_stat +from resolvers.stat import (author_follows_authors, author_follows_topics, + get_with_stat) from services.auth import login_required from services.cache import cache_author, cache_follower from services.db import local_session diff --git a/resolvers/follower.py b/resolvers/follower.py index b29f75ab..eb0d4e09 100644 --- a/resolvers/follower.py +++ b/resolvers/follower.py @@ -11,7 +11,8 @@ from orm.community import Community from orm.reaction import Reaction from orm.shout import Shout, ShoutReactionsFollower from orm.topic import Topic, TopicFollower -from resolvers.stat import author_follows_authors, author_follows_topics, get_with_stat +from resolvers.stat import (author_follows_authors, author_follows_topics, + get_with_stat) from services.auth import login_required from services.cache import DEFAULT_FOLLOWS, cache_follower from services.db import local_session diff --git a/resolvers/notifier.py b/resolvers/notifier.py index 8ce824e3..7b9346f8 100644 --- a/resolvers/notifier.py +++ b/resolvers/notifier.py @@ -8,12 +8,8 @@ from sqlalchemy.orm import aliased from sqlalchemy.sql import not_ from orm.author import Author -from orm.notification import ( - Notification, - NotificationAction, - NotificationEntity, - NotificationSeen, -) +from orm.notification import (Notification, NotificationAction, + NotificationEntity, NotificationSeen) from orm.shout import Shout from services.auth import login_required from services.db import local_session diff --git a/resolvers/reaction.py b/resolvers/reaction.py index 5abc152c..31dd51b7 100644 --- a/resolvers/reaction.py +++ b/resolvers/reaction.py @@ -6,7 +6,8 @@ from sqlalchemy.orm import aliased, joinedload from sqlalchemy.sql import union from orm.author import Author -from orm.rating import PROPOSAL_REACTIONS, RATING_REACTIONS, is_negative, is_positive +from orm.rating import (PROPOSAL_REACTIONS, RATING_REACTIONS, is_negative, + is_positive) from orm.reaction import Reaction, ReactionKind from orm.shout import Shout from resolvers.editor import handle_proposing diff --git a/resolvers/reader.py b/resolvers/reader.py index fa130bd2..8090cd15 100644 --- a/resolvers/reader.py +++ b/resolvers/reader.py @@ -1,6 +1,7 @@ from sqlalchemy import bindparam, distinct, or_, text from sqlalchemy.orm import aliased, joinedload -from sqlalchemy.sql.expression import and_, asc, case, desc, func, nulls_last, select +from sqlalchemy.sql.expression import (and_, asc, case, desc, func, nulls_last, + select) from orm.author import Author, AuthorFollower from orm.reaction import Reaction, ReactionKind diff --git a/services/db.py b/services/db.py index 7030f3bb..048333b7 100644 --- a/services/db.py +++ b/services/db.py @@ -5,7 +5,8 @@ import traceback import warnings from typing import Any, Callable, Dict, TypeVar -from sqlalchemy import JSON, Column, Engine, Integer, create_engine, event, exc, inspect +from sqlalchemy import (JSON, Column, Engine, Integer, create_engine, event, + exc, inspect) from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import Session, configure_mappers from sqlalchemy.sql.schema import Table diff --git a/services/logger.py b/services/logger.py index 3954b7f7..3a1f1dfb 100644 --- a/services/logger.py +++ b/services/logger.py @@ -1,4 +1,5 @@ import logging + import colorlog # Define the color scheme diff --git a/services/viewed.py b/services/viewed.py index abf0f22e..c6abfe0f 100644 --- a/services/viewed.py +++ b/services/viewed.py @@ -7,12 +7,8 @@ from typing import Dict # ga from google.analytics.data_v1beta import BetaAnalyticsDataClient -from google.analytics.data_v1beta.types import ( - DateRange, - Dimension, - Metric, - RunReportRequest, -) +from google.analytics.data_v1beta.types import (DateRange, Dimension, Metric, + RunReportRequest) from orm.author import Author from orm.shout import Shout, ShoutAuthor, ShoutTopic