PEP8 formatting

This commit is contained in:
Sybren A. Stüvel 2016-07-07 11:57:59 +02:00
parent ff8d5c96b7
commit ff99134ac4

View File

@ -151,9 +151,9 @@ organizations_schema = {
'type': 'objectid', 'type': 'objectid',
'nullable': True, 'nullable': True,
'data_relation': { 'data_relation': {
'resource': 'files', 'resource': 'files',
'field': '_id', 'field': '_id',
'embeddable': True 'embeddable': True
}, },
}, },
'users': { 'users': {
@ -239,7 +239,7 @@ permissions_embedded_schema = {
'schema': { 'schema': {
'type': 'dict', 'type': 'dict',
'schema': { 'schema': {
'user' : { 'user': {
'type': 'objectid', 'type': 'objectid',
'required': True, 'required': True,
}, },
@ -253,8 +253,8 @@ permissions_embedded_schema = {
}, },
'world': { 'world': {
'type': 'list', 'type': 'list',
#'required': True, # 'required': True,
'allowed': ['GET',] 'allowed': ['GET', ]
}, },
'is_free': { 'is_free': {
'type': 'boolean', 'type': 'boolean',
@ -274,9 +274,9 @@ nodes_schema = {
'picture': { 'picture': {
'type': 'objectid', 'type': 'objectid',
'data_relation': { 'data_relation': {
'resource': 'files', 'resource': 'files',
'field': '_id', 'field': '_id',
'embeddable': True 'embeddable': True
}, },
}, },
'order': { 'order': {
@ -288,19 +288,19 @@ nodes_schema = {
}, },
'parent': { 'parent': {
'type': 'objectid', 'type': 'objectid',
'data_relation': { 'data_relation': {
'resource': 'nodes', 'resource': 'nodes',
'field': '_id', 'field': '_id',
'embeddable': True 'embeddable': True
}, },
}, },
'project': { 'project': {
'type': 'objectid', 'type': 'objectid',
'data_relation': { 'data_relation': {
'resource': 'projects', 'resource': 'projects',
'field': '_id', 'field': '_id',
'embeddable': True 'embeddable': True
}, },
}, },
'user': { 'user': {
'type': 'objectid', 'type': 'objectid',
@ -315,10 +315,10 @@ nodes_schema = {
'required': True 'required': True
}, },
'properties': { 'properties': {
'type' : 'dict', 'type': 'dict',
'valid_properties' : True, 'valid_properties': True,
'required': True, 'required': True,
}, },
'permissions': { 'permissions': {
'type': 'dict', 'type': 'dict',
'schema': permissions_embedded_schema 'schema': permissions_embedded_schema
@ -383,7 +383,7 @@ files_schema = {
'description': { 'description': {
'type': 'string', 'type': 'string',
}, },
'content_type': { # MIME type image/png video/mp4 'content_type': { # MIME type image/png video/mp4
'type': 'string', 'type': 'string',
'required': True, 'required': True,
}, },
@ -391,13 +391,13 @@ files_schema = {
'duration': { 'duration': {
'type': 'integer', 'type': 'integer',
}, },
'size': { # xs, s, b, 720p, 2K 'size': { # xs, s, b, 720p, 2K
'type': 'string' 'type': 'string'
}, },
'format': { # human readable format, like mp4, HLS, webm, mov 'format': { # human readable format, like mp4, HLS, webm, mov
'type': 'string' 'type': 'string'
}, },
'width': { # valid for images and video content_type 'width': { # valid for images and video content_type
'type': 'integer' 'type': 'integer'
}, },
'height': { 'height': {
@ -407,7 +407,7 @@ files_schema = {
'type': 'objectid', 'type': 'objectid',
'required': True, 'required': True,
}, },
'length': { # Size in bytes 'length': { # Size in bytes
'type': 'integer', 'type': 'integer',
'required': True, 'required': True,
}, },
@ -457,34 +457,34 @@ files_schema = {
'embeddable': True 'embeddable': True
}, },
}, },
'variations': { # File variations (used to be children, see above) 'variations': { # File variations (used to be children, see above)
'type': 'list', 'type': 'list',
'schema': { 'schema': {
'type': 'dict', 'type': 'dict',
'schema': { 'schema': {
'is_public': { # If True, the link will not be hashed or signed 'is_public': { # If True, the link will not be hashed or signed
'type': 'boolean' 'type': 'boolean'
}, },
'content_type': { # MIME type image/png video/mp4 'content_type': { # MIME type image/png video/mp4
'type': 'string', 'type': 'string',
'required': True, 'required': True,
}, },
'duration': { 'duration': {
'type': 'integer', 'type': 'integer',
}, },
'size': { # xs, s, b, 720p, 2K 'size': { # xs, s, b, 720p, 2K
'type': 'string' 'type': 'string'
}, },
'format': { # human readable format, like mp4, HLS, webm, mov 'format': { # human readable format, like mp4, HLS, webm, mov
'type': 'string' 'type': 'string'
}, },
'width': { # valid for images and video content_type 'width': { # valid for images and video content_type
'type': 'integer' 'type': 'integer'
}, },
'height': { 'height': {
'type': 'integer' 'type': 'integer'
}, },
'length': { # Size in bytes 'length': { # Size in bytes
'type': 'integer', 'type': 'integer',
'required': True, 'required': True,
}, },
@ -505,7 +505,7 @@ files_schema = {
'type': 'dict', 'type': 'dict',
'schema': { 'schema': {
'job_id': { 'job_id': {
'type': 'string' # can be int, depending on the backend 'type': 'string' # can be int, depending on the backend
}, },
'backend': { 'backend': {
'type': 'string', 'type': 'string',
@ -514,7 +514,7 @@ files_schema = {
'status': { 'status': {
'type': 'string', 'type': 'string',
'allowed': ["pending", "waiting", "processing", "finished", 'allowed': ["pending", "waiting", "processing", "finished",
"failed", "cancelled"] "failed", "cancelled"]
}, },
} }
}, },
@ -584,9 +584,9 @@ projects_schema = {
'type': 'objectid', 'type': 'objectid',
'nullable': True, 'nullable': True,
'data_relation': { 'data_relation': {
'resource': 'organizations', 'resource': 'organizations',
'field': '_id', 'field': '_id',
'embeddable': True 'embeddable': True
}, },
}, },
'status': { 'status': {
@ -740,9 +740,9 @@ tokens = {
'resource_methods': ['GET', 'POST'], 'resource_methods': ['GET', 'POST'],
# Allow 'token' to be returned with POST responses # Allow 'token' to be returned with POST responses
#'extra_response_fields': ['token'], # 'extra_response_fields': ['token'],
'schema' : tokens_schema 'schema': tokens_schema
} }
files = { files = {
@ -784,7 +784,6 @@ notifications = {
'schema': notifications_schema, 'schema': notifications_schema,
} }
DOMAIN = { DOMAIN = {
'users': users, 'users': users,
'nodes': nodes, 'nodes': nodes,
@ -798,7 +797,6 @@ DOMAIN = {
'notifications': notifications 'notifications': notifications
} }
MONGO_HOST = os.environ.get('MONGO_HOST', 'localhost') MONGO_HOST = os.environ.get('MONGO_HOST', 'localhost')
MONGO_PORT = os.environ.get('MONGO_PORT', 27017) MONGO_PORT = os.environ.get('MONGO_PORT', 27017)
MONGO_DBNAME = os.environ.get('MONGO_DBNAME', 'eve') MONGO_DBNAME = os.environ.get('MONGO_DBNAME', 'eve')