Skip to content

Commit

Permalink
[format] Rerun updated formatting packages
Browse files Browse the repository at this point in the history
  • Loading branch information
drcpu-github committed Mar 14, 2024
1 parent 1150bbf commit 44f2660
Show file tree
Hide file tree
Showing 12 changed files with 57 additions and 57 deletions.
6 changes: 3 additions & 3 deletions api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ def create_app(mock=False):
app.config["OPENAPI_VERSION"] = "3.0.3"
app.config["OPENAPI_URL_PREFIX"] = "/api"
app.config["OPENAPI_RAPIDOC_PATH"] = "/documentation"
app.config[
"OPENAPI_RAPIDOC_URL"
] = "https://cdn.jsdelivr.net/npm/rapidoc/dist/rapidoc-min.js"
app.config["OPENAPI_RAPIDOC_URL"] = (
"https://cdn.jsdelivr.net/npm/rapidoc/dist/rapidoc-min.js"
)
app.config["OPENAPI_RAPIDOC_CONFIG"] = {
"allow-authentication": "false",
"allow-spec-file-download": "true",
Expand Down
6 changes: 3 additions & 3 deletions schemas/component/commit_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ def validate_inputs(self, args, **kwargs):
if len(args["input_values"]) < 1:
errors["input_values"] = "Need at least one input value."
if len(args["input_utxos"]) != len(args["input_values"]):
errors[
"input_utxos"
] = "Number of input UTXO's and input values is different."
errors["input_utxos"] = (
"Number of input UTXO's and input values is different."
)
if len(errors) > 0:
raise ValidationError(errors)
6 changes: 3 additions & 3 deletions schemas/component/mint_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ def validate_inputs(self, args, **kwargs):
if len(args["output_addresses"]) < 1:
errors["output_addresses"] = "Need at least one output address."
if len(args["output_addresses"]) != len(args["output_values"]):
errors[
"output_values"
] = "Number of output addresses and values is different."
errors["output_values"] = (
"Number of output addresses and values is different."
)
if len(errors):
raise ValidationError(errors)

Expand Down
6 changes: 3 additions & 3 deletions schemas/component/tally_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ def validate_sizes(self, args, **kwargs):
if len(args["output_addresses"]) < 1:
errors["output_addresses"] = "Need at least one output address."
if len(args["output_addresses"]) != len(args["output_values"]):
errors[
"output_values"
] = "Size of output addresses and output values does not match."
errors["output_values"] = (
"Size of output addresses and output values does not match."
)
if len(errors):
raise ValidationError(errors)

Expand Down
12 changes: 6 additions & 6 deletions tests/api/search/test_hash.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,9 @@ def test_search_data_request_history_RAD_page_1(client, data_request_history_rad
"page": 1,
"next_page": 2,
}
data_request_history_rad["data_request_history"][
"history"
] = data_request_history_rad["data_request_history"]["history"][:5]
data_request_history_rad["data_request_history"]["history"] = (
data_request_history_rad["data_request_history"]["history"][:5]
)
assert json.loads(response.data) == data_request_history_rad


Expand All @@ -374,7 +374,7 @@ def test_search_data_request_history_RAD_page_2(client, data_request_history_rad
"page": 2,
"previous_page": 1,
}
data_request_history_rad["data_request_history"][
"history"
] = data_request_history_rad["data_request_history"]["history"][5:]
data_request_history_rad["data_request_history"]["history"] = (
data_request_history_rad["data_request_history"]["history"][5:]
)
assert json.loads(response.data) == data_request_history_rad
6 changes: 3 additions & 3 deletions tests/schemas/component/test_block_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ def test_block_details_success(block_details):


def test_block_details_failure_hash(block_details):
block_details[
"hash"
] = "zbcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef0123456789"
block_details["hash"] = (
"zbcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef0123456789"
)
with pytest.raises(ValidationError) as err_info:
BlockDetails().load(block_details)
assert err_info.value.messages["hash"][0] == "Hash is not a hexadecimal value."
Expand Down
6 changes: 3 additions & 3 deletions tests/schemas/component/test_commit_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ def test_commit_transaction_for_block_success(commit_transaction_for_block):


def test_commit_transaction_for_block_failure_hash(commit_transaction_for_block):
commit_transaction_for_block[
"data_request"
] = "zbcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef0123456789"
commit_transaction_for_block["data_request"] = (
"zbcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef0123456789"
)
with pytest.raises(ValidationError) as err_info:
CommitTransactionForBlock().load(commit_transaction_for_block)
assert (
Expand Down
18 changes: 9 additions & 9 deletions tests/schemas/component/test_data_request_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ def test_data_request_failure_address(data_request):


def test_data_request_failure_hash(data_request):
data_request[
"RAD_bytes_hash"
] = "abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef012345678"
data_request[
"DRO_bytes_hash"
] = "zbcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef0123456789"
data_request["RAD_bytes_hash"] = (
"abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef012345678"
)
data_request["DRO_bytes_hash"] = (
"zbcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef0123456789"
)
with pytest.raises(ValidationError) as err_info:
DataRequest().load(data_request)
assert len(err_info.value.messages) == 2
Expand Down Expand Up @@ -380,9 +380,9 @@ def test_data_request_transaction_for_explorer_success_none(
def test_data_request_transaction_for_explorer_failure_address(
data_request_transaction_for_explorer,
):
data_request_transaction_for_explorer[
"output_address"
] = "wit100000000000000000000000000000000r0v4g"
data_request_transaction_for_explorer["output_address"] = (
"wit100000000000000000000000000000000r0v4g"
)
with pytest.raises(ValidationError) as err_info:
DataRequestTransactionForExplorer().load(data_request_transaction_for_explorer)
assert (
Expand Down
12 changes: 6 additions & 6 deletions tests/schemas/component/test_reveal_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ def test_reveal_transaction_for_block_success(reveal_transaction_for_block):


def test_reveal_transaction_for_block_failure_hash(reveal_transaction_for_block):
reveal_transaction_for_block[
"data_request"
] = "zbcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef0123456789"
reveal_transaction_for_block["data_request"] = (
"zbcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef0123456789"
)
with pytest.raises(ValidationError) as err_info:
RevealTransactionForBlock().load(reveal_transaction_for_block)
assert (
Expand Down Expand Up @@ -152,9 +152,9 @@ def test_reveal_transaction_for_explorer_success(reveal_transaction_for_explorer


def test_reveal_transaction_for_explorer_failure_hash(reveal_transaction_for_explorer):
reveal_transaction_for_explorer[
"data_request"
] = "zbcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef0123456789"
reveal_transaction_for_explorer["data_request"] = (
"zbcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef0123456789"
)
with pytest.raises(ValidationError) as err_info:
RevealTransactionForExplorer().load(reveal_transaction_for_explorer)
assert (
Expand Down
12 changes: 6 additions & 6 deletions tests/schemas/component/test_tally_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,9 @@ def test_tally_transaction_for_block_success(tally_transaction_for_block):


def test_tally_transaction_for_block_failure_hash(tally_transaction_for_block):
tally_transaction_for_block[
"data_request"
] = "zbcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef0123456789"
tally_transaction_for_block["data_request"] = (
"zbcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef0123456789"
)
with pytest.raises(ValidationError) as err_info:
TallyTransactionForBlock().load(tally_transaction_for_block)
assert (
Expand Down Expand Up @@ -324,9 +324,9 @@ def test_tally_transaction_for_explorer_success(tally_transaction_for_explorer):


def test_tally_transaction_for_explorer_failure_hash(tally_transaction_for_explorer):
tally_transaction_for_explorer[
"data_request"
] = "zbcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef0123456789"
tally_transaction_for_explorer["data_request"] = (
"zbcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef0123456789"
)
with pytest.raises(ValidationError) as err_info:
TallyTransactionForExplorer().load(tally_transaction_for_explorer)
assert (
Expand Down
6 changes: 3 additions & 3 deletions tests/schemas/include/test_input_utxo_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ def test_input_utxo_pointer_success(input_utxo_pointer):


def test_input_utxo_pointer_failure_pointer(input_utxo_pointer):
input_utxo_pointer[
"input_utxo"
] = "zbcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef0123456789:0"
input_utxo_pointer["input_utxo"] = (
"zbcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef0123456789:0"
)
with pytest.raises(ValidationError) as err_info:
InputUtxoPointer().load(input_utxo_pointer)
assert (
Expand Down
18 changes: 9 additions & 9 deletions tests/schemas/search/test_data_request_history_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ def test_data_request_history_entry_success_minimal(data_request_history_entry):


def test_data_request_history_entry_failure_hash(data_request_history_entry):
data_request_history_entry[
"data_request"
] = "zbcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef0123456789"
data_request_history_entry["data_request"] = (
"zbcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef0123456789"
)
with pytest.raises(ValidationError) as err_info:
DataRequestHistoryEntry().load(data_request_history_entry)
assert (
Expand Down Expand Up @@ -164,12 +164,12 @@ def test_data_request_history_failure_type(data_request_history):


def test_data_request_history_failure_hash(data_request_history):
data_request_history[
"hash"
] = "zbcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef0123456789"
data_request_history[
"RAD_bytes_hash"
] = "zbcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef0123456789"
data_request_history["hash"] = (
"zbcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef0123456789"
)
data_request_history["RAD_bytes_hash"] = (
"zbcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef0123456789"
)
with pytest.raises(ValidationError) as err_info:
DataRequestHistory().load(data_request_history)
assert len(err_info.value.messages) == 2
Expand Down

0 comments on commit 44f2660

Please sign in to comment.