mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-29 03:38:11 +08:00
Apply yapf to python files
This commit is contained in:
@@ -7,6 +7,7 @@ from server.app.util.errors import DriverError
|
||||
|
||||
|
||||
class Float32JSONEncoder(json.JSONEncoder):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
"""
|
||||
NaN/Infinities are illegal in standard JSON. Python extends JSON with
|
||||
@@ -35,9 +36,12 @@ def jsonify_scanpy(data):
|
||||
|
||||
|
||||
def requires_data(func):
|
||||
|
||||
@wraps(func)
|
||||
def wrapped_function(self, *args, **kwargs):
|
||||
if self.data is None:
|
||||
raise DriverError(f"error data must be loaded before you call {func.__name__}")
|
||||
raise DriverError(
|
||||
f"error data must be loaded before you call {func.__name__}")
|
||||
return func(self, *args, **kwargs)
|
||||
|
||||
return wrapped_function
|
||||
|
||||
Reference in New Issue
Block a user