Runs black

This commit is contained in:
Mouse Reeve
2021-03-08 08:49:10 -08:00
parent a07f955781
commit 70296e760b
198 changed files with 10239 additions and 8572 deletions

View File

@@ -1,4 +1,4 @@
''' bring activitypub functions into the namespace '''
""" bring activitypub functions into the namespace """
import inspect
import sys
@@ -21,9 +21,9 @@ from .verbs import Announce, Like
# this creates a list of all the Activity types that we can serialize,
# so when an Activity comes in from outside, we can check if it's known
cls_members = inspect.getmembers(sys.modules[__name__], inspect.isclass)
activity_objects = {c[0]: c[1] for c in cls_members \
if hasattr(c[1], 'to_model')}
activity_objects = {c[0]: c[1] for c in cls_members if hasattr(c[1], "to_model")}
def parse(activity_json):
''' figure out what activity this is and parse it '''
""" figure out what activity this is and parse it """
return naive_parse(activity_objects, activity_json)