mirror of
https://github.com/Blockstream/satellite-api.git
synced 2025-02-22 05:41:37 +01:00
Add missing blank lines around class methods
This verification was added on yapf 0.32 and it follows the pep8 specification.
This commit is contained in:
parent
da31d10916
commit
76a51eec52
4 changed files with 11 additions and 0 deletions
|
@ -7,6 +7,7 @@ import constants
|
||||||
|
|
||||||
|
|
||||||
class InfoResource(Resource):
|
class InfoResource(Resource):
|
||||||
|
|
||||||
def get(self):
|
def get(self):
|
||||||
try:
|
try:
|
||||||
info_response = requests.get(f"{constants.CHARGE_ROOT}/info",
|
info_response = requests.get(f"{constants.CHARGE_ROOT}/info",
|
||||||
|
|
|
@ -37,6 +37,7 @@ def sha256_checksum(filename, block_size=SHA256_BLOCK_SIZE):
|
||||||
|
|
||||||
|
|
||||||
class OrderResource(Resource):
|
class OrderResource(Resource):
|
||||||
|
|
||||||
def get(self, uuid):
|
def get(self, uuid):
|
||||||
success, order_or_error = order_helpers.get_and_authenticate_order(
|
success, order_or_error = order_helpers.get_and_authenticate_order(
|
||||||
uuid, request.form, request.args)
|
uuid, request.form, request.args)
|
||||||
|
@ -67,6 +68,7 @@ class OrderResource(Resource):
|
||||||
|
|
||||||
|
|
||||||
class OrderUploadResource(Resource):
|
class OrderUploadResource(Resource):
|
||||||
|
|
||||||
def post(self):
|
def post(self):
|
||||||
args = request.form
|
args = request.form
|
||||||
errors = order_upload_req_schema.validate(args)
|
errors = order_upload_req_schema.validate(args)
|
||||||
|
@ -145,6 +147,7 @@ class OrderUploadResource(Resource):
|
||||||
|
|
||||||
|
|
||||||
class BumpOrderResource(Resource):
|
class BumpOrderResource(Resource):
|
||||||
|
|
||||||
def post(self, uuid):
|
def post(self, uuid):
|
||||||
query_args = request.args
|
query_args = request.args
|
||||||
form_args = request.form
|
form_args = request.form
|
||||||
|
@ -180,6 +183,7 @@ class BumpOrderResource(Resource):
|
||||||
|
|
||||||
|
|
||||||
class OrdersResource(Resource):
|
class OrdersResource(Resource):
|
||||||
|
|
||||||
def get(self, state):
|
def get(self, state):
|
||||||
if state not in ['pending', 'queued', 'sent']:
|
if state not in ['pending', 'queued', 'sent']:
|
||||||
return {
|
return {
|
||||||
|
@ -227,6 +231,7 @@ class OrdersResource(Resource):
|
||||||
|
|
||||||
|
|
||||||
class GetMessageResource(Resource):
|
class GetMessageResource(Resource):
|
||||||
|
|
||||||
def get(self, uuid):
|
def get(self, uuid):
|
||||||
order = Order.query.filter_by(uuid=uuid).filter(
|
order = Order.query.filter_by(uuid=uuid).filter(
|
||||||
or_(Order.status == OrderStatus.sent.value,
|
or_(Order.status == OrderStatus.sent.value,
|
||||||
|
@ -243,6 +248,7 @@ class GetMessageResource(Resource):
|
||||||
|
|
||||||
|
|
||||||
class GetMessageBySeqNumResource(Resource):
|
class GetMessageBySeqNumResource(Resource):
|
||||||
|
|
||||||
def get(self, tx_seq_num):
|
def get(self, tx_seq_num):
|
||||||
order = Order.query.filter_by(tx_seq_num=tx_seq_num).filter(
|
order = Order.query.filter_by(tx_seq_num=tx_seq_num).filter(
|
||||||
or_(Order.status == OrderStatus.sent.value,
|
or_(Order.status == OrderStatus.sent.value,
|
||||||
|
@ -260,6 +266,7 @@ class GetMessageBySeqNumResource(Resource):
|
||||||
|
|
||||||
|
|
||||||
class TxConfirmationResource(Resource):
|
class TxConfirmationResource(Resource):
|
||||||
|
|
||||||
def post(self, tx_seq_num):
|
def post(self, tx_seq_num):
|
||||||
args = request.form
|
args = request.form
|
||||||
errors = tx_confirmation_schema.validate(args)
|
errors = tx_confirmation_schema.validate(args)
|
||||||
|
@ -318,6 +325,7 @@ class TxConfirmationResource(Resource):
|
||||||
|
|
||||||
|
|
||||||
class RxConfirmationResource(Resource):
|
class RxConfirmationResource(Resource):
|
||||||
|
|
||||||
def post(self, tx_seq_num):
|
def post(self, tx_seq_num):
|
||||||
args = request.form
|
args = request.form
|
||||||
errors = rx_confirmation_schema.validate(args)
|
errors = rx_confirmation_schema.validate(args)
|
||||||
|
|
|
@ -4,6 +4,7 @@ import constants
|
||||||
|
|
||||||
|
|
||||||
class QueueResource(Resource):
|
class QueueResource(Resource):
|
||||||
|
|
||||||
def get(self):
|
def get(self):
|
||||||
return make_response(render_template('queue.html', env=constants.env),
|
return make_response(render_template('queue.html', env=constants.env),
|
||||||
200, {'Content-Type': 'text/html'})
|
200, {'Content-Type': 'text/html'})
|
||||||
|
|
|
@ -15,6 +15,7 @@ class Worker:
|
||||||
name : Optional worker name.
|
name : Optional worker name.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, period, fcn, args, name=""):
|
def __init__(self, period, fcn, args, name=""):
|
||||||
assert (isinstance(args, tuple))
|
assert (isinstance(args, tuple))
|
||||||
self.period = period
|
self.period = period
|
||||||
|
|
Loading…
Add table
Reference in a new issue