Black/isort

This commit is contained in:
Thomas Sileo
2018-06-16 22:02:10 +02:00
parent c5295524c7
commit d9362adb25
16 changed files with 814 additions and 672 deletions

View File

@@ -1,23 +1,30 @@
import logging
from datetime import datetime
from typing import Any
from typing import Dict
from typing import List
from typing import Optional
from typing import Union
from bson.objectid import ObjectId
from html2text import html2text
from feedgen.feed import FeedGenerator
from html2text import html2text
import tasks
from config import BASE_URL
from config import DB
from config import ID
from config import ME
from config import USER_AGENT
from config import USERNAME
from little_boxes import activitypub as ap
from little_boxes.backend import Backend
from little_boxes.collection import parse_collection as ap_parse_collection
from config import USERNAME, BASE_URL, ID
from config import DB, ME
import tasks
from typing import List, Optional, Dict, Any, Union
logger = logging.getLogger(__name__)
MY_PERSON = ap.Person(**ME)
def _remove_id(doc: ap.ObjectType) -> ap.ObjectType:
"""Helper for removing MongoDB's `_id` field."""
@@ -35,6 +42,9 @@ def _to_list(data: Union[List[Any], Any]) -> List[Any]:
class MicroblogPubBackend(Backend):
def user_agent(self) -> str:
return USER_AGENT
def base_url(self) -> str:
return BASE_URL