mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-11-15 03:04:28 +00:00
Run isort
This commit is contained in:
parent
329f8926dd
commit
116d2e3e6e
6 changed files with 22 additions and 19 deletions
|
@ -1,7 +1,7 @@
|
||||||
import hashlib
|
import hashlib
|
||||||
|
import json
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import json
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
20
app.py
20
app.py
|
@ -17,19 +17,18 @@ from typing import Tuple
|
||||||
from urllib.parse import urlencode
|
from urllib.parse import urlencode
|
||||||
from urllib.parse import urlparse
|
from urllib.parse import urlparse
|
||||||
|
|
||||||
from requests.exceptions import HTTPError
|
|
||||||
import requests
|
|
||||||
import bleach
|
import bleach
|
||||||
import mf2py
|
import mf2py
|
||||||
import pymongo
|
import pymongo
|
||||||
|
import requests
|
||||||
import timeago
|
import timeago
|
||||||
from bson.objectid import ObjectId
|
from bson.objectid import ObjectId
|
||||||
from dateutil import parser
|
from dateutil import parser
|
||||||
from flask import Flask
|
from flask import Flask
|
||||||
from flask import make_response
|
|
||||||
from flask import Response
|
from flask import Response
|
||||||
from flask import abort
|
from flask import abort
|
||||||
from flask import jsonify as flask_jsonify
|
from flask import jsonify as flask_jsonify
|
||||||
|
from flask import make_response
|
||||||
from flask import redirect
|
from flask import redirect
|
||||||
from flask import render_template
|
from flask import render_template
|
||||||
from flask import request
|
from flask import request
|
||||||
|
@ -46,27 +45,25 @@ from little_boxes.activitypub import format_datetime
|
||||||
from little_boxes.activitypub import get_backend
|
from little_boxes.activitypub import get_backend
|
||||||
from little_boxes.content_helper import parse_markdown
|
from little_boxes.content_helper import parse_markdown
|
||||||
from little_boxes.errors import ActivityGoneError
|
from little_boxes.errors import ActivityGoneError
|
||||||
from little_boxes.errors import NotAnActivityError
|
|
||||||
from little_boxes.errors import BadActivityError
|
|
||||||
from little_boxes.errors import ActivityNotFoundError
|
from little_boxes.errors import ActivityNotFoundError
|
||||||
|
from little_boxes.errors import BadActivityError
|
||||||
from little_boxes.errors import Error
|
from little_boxes.errors import Error
|
||||||
|
from little_boxes.errors import NotAnActivityError
|
||||||
from little_boxes.errors import NotFromOutboxError
|
from little_boxes.errors import NotFromOutboxError
|
||||||
from little_boxes.httpsig import HTTPSigAuth
|
from little_boxes.httpsig import HTTPSigAuth
|
||||||
from little_boxes.httpsig import verify_request
|
from little_boxes.httpsig import verify_request
|
||||||
from little_boxes.webfinger import get_actor_url
|
from little_boxes.webfinger import get_actor_url
|
||||||
from little_boxes.webfinger import get_remote_follow_template
|
from little_boxes.webfinger import get_remote_follow_template
|
||||||
from utils import opengraph
|
|
||||||
from passlib.hash import bcrypt
|
from passlib.hash import bcrypt
|
||||||
|
from requests.exceptions import HTTPError
|
||||||
from u2flib_server import u2f
|
from u2flib_server import u2f
|
||||||
from werkzeug.utils import secure_filename
|
from werkzeug.utils import secure_filename
|
||||||
|
|
||||||
import activitypub
|
import activitypub
|
||||||
import config
|
import config
|
||||||
|
|
||||||
from activitypub import Box
|
from activitypub import Box
|
||||||
from activitypub import embed_collection
|
|
||||||
from activitypub import _answer_key
|
from activitypub import _answer_key
|
||||||
from config import USER_AGENT
|
from activitypub import embed_collection
|
||||||
from config import ADMIN_API_KEY
|
from config import ADMIN_API_KEY
|
||||||
from config import BASE_URL
|
from config import BASE_URL
|
||||||
from config import DB
|
from config import DB
|
||||||
|
@ -81,15 +78,16 @@ from config import KEY
|
||||||
from config import ME
|
from config import ME
|
||||||
from config import MEDIA_CACHE
|
from config import MEDIA_CACHE
|
||||||
from config import PASS
|
from config import PASS
|
||||||
|
from config import USER_AGENT
|
||||||
from config import USERNAME
|
from config import USERNAME
|
||||||
from config import VERSION
|
from config import VERSION
|
||||||
from config import _drop_db
|
from config import _drop_db
|
||||||
|
from poussetaches import PousseTaches
|
||||||
|
from utils import opengraph
|
||||||
from utils.key import get_secret_key
|
from utils.key import get_secret_key
|
||||||
from utils.lookup import lookup
|
from utils.lookup import lookup
|
||||||
from utils.media import Kind
|
from utils.media import Kind
|
||||||
|
|
||||||
from poussetaches import PousseTaches
|
|
||||||
|
|
||||||
p = PousseTaches(
|
p = PousseTaches(
|
||||||
os.getenv("MICROBLOGPUB_POUSSETACHES_HOST", "http://localhost:7991"),
|
os.getenv("MICROBLOGPUB_POUSSETACHES_HOST", "http://localhost:7991"),
|
||||||
os.getenv("MICROBLOGPUB_INTERNAL_HOST", "http://localhost:5000"),
|
os.getenv("MICROBLOGPUB_INTERNAL_HOST", "http://localhost:5000"),
|
||||||
|
|
|
@ -4,6 +4,7 @@ import subprocess
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
||||||
|
import pymongo
|
||||||
import requests
|
import requests
|
||||||
import sass
|
import sass
|
||||||
import yaml
|
import yaml
|
||||||
|
@ -11,7 +12,6 @@ from itsdangerous import JSONWebSignatureSerializer
|
||||||
from little_boxes import strtobool
|
from little_boxes import strtobool
|
||||||
from little_boxes.activitypub import DEFAULT_CTX
|
from little_boxes.activitypub import DEFAULT_CTX
|
||||||
from pymongo import MongoClient
|
from pymongo import MongoClient
|
||||||
import pymongo
|
|
||||||
|
|
||||||
from utils.key import KEY_DIR
|
from utils.key import KEY_DIR
|
||||||
from utils.key import get_key
|
from utils.key import get_key
|
||||||
|
|
|
@ -1,13 +1,15 @@
|
||||||
import base64
|
import base64
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
from typing import Dict
|
from datetime import datetime
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
from typing import Dict
|
||||||
from typing import List
|
from typing import List
|
||||||
from dataclasses import dataclass
|
|
||||||
import flask
|
import flask
|
||||||
import requests
|
import requests
|
||||||
from datetime import datetime
|
|
||||||
|
from dataclasses import dataclass
|
||||||
|
|
||||||
POUSSETACHES_AUTH_KEY = os.getenv("POUSSETACHES_AUTH_KEY")
|
POUSSETACHES_AUTH_KEY = os.getenv("POUSSETACHES_AUTH_KEY")
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
"""Basic wizard for setting up microblog.pub configuration files."""
|
"""Basic wizard for setting up microblog.pub configuration files."""
|
||||||
import os
|
|
||||||
import binascii
|
import binascii
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import bcrypt
|
import bcrypt
|
||||||
from prompt_toolkit import prompt
|
|
||||||
from markdown import markdown
|
from markdown import markdown
|
||||||
|
from prompt_toolkit import prompt
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
@ -63,4 +64,5 @@ if __name__ == "__main__":
|
||||||
try:
|
try:
|
||||||
main()
|
main()
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
pass
|
print("Aborted")
|
||||||
|
sys.exit(1)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import opengraph
|
import opengraph
|
||||||
import requests
|
import requests
|
||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
|
|
Loading…
Reference in a new issue