style: Update pre-commit hooks (#2290)

Update versions of pre-commit hooks to latest version.

Co-authored-by: mathbunnyru <12270691+mathbunnyru@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2025-07-02 16:36:34 +01:00
committed by GitHub
parent 1fe323190a
commit cc506fd094
107 changed files with 4253 additions and 3072 deletions

View File

@@ -181,14 +181,16 @@ TEST_F(RPCAccountNFTsHandlerTest, LedgerNotFoundViaHash)
ON_CALL(*backend_, fetchLedgerByHash(ripple::uint256{kLEDGER_HASH}, _))
.WillByDefault(Return(std::optional<ripple::LedgerHeader>{}));
static auto const kINPUT = json::parse(fmt::format(
R"JSON({{
static auto const kINPUT = json::parse(
fmt::format(
R"JSON({{
"account": "{}",
"ledger_hash": "{}"
}})JSON",
kACCOUNT,
kLEDGER_HASH
));
kACCOUNT,
kLEDGER_HASH
)
);
auto const handler = AnyHandler{AccountNFTsHandler{backend_}};
runSpawn([&](auto yield) {
auto const output = handler.process(kINPUT, Context{yield});
@@ -207,14 +209,16 @@ TEST_F(RPCAccountNFTsHandlerTest, LedgerNotFoundViaStringIndex)
// return empty ledgerHeader
ON_CALL(*backend_, fetchLedgerBySequence(kSEQ, _)).WillByDefault(Return(std::optional<ripple::LedgerHeader>{}));
static auto const kINPUT = json::parse(fmt::format(
R"JSON({{
static auto const kINPUT = json::parse(
fmt::format(
R"JSON({{
"account": "{}",
"ledger_index": "{}"
}})JSON",
kACCOUNT,
kSEQ
));
kACCOUNT,
kSEQ
)
);
auto const handler = AnyHandler{AccountNFTsHandler{backend_}};
runSpawn([&](auto yield) {
auto const output = handler.process(kINPUT, Context{yield});
@@ -233,14 +237,16 @@ TEST_F(RPCAccountNFTsHandlerTest, LedgerNotFoundViaIntIndex)
// return empty ledgerHeader
ON_CALL(*backend_, fetchLedgerBySequence(kSEQ, _)).WillByDefault(Return(std::optional<ripple::LedgerHeader>{}));
static auto const kINPUT = json::parse(fmt::format(
R"JSON({{
static auto const kINPUT = json::parse(
fmt::format(
R"JSON({{
"account": "{}",
"ledger_index": {}
}})JSON",
kACCOUNT,
kSEQ
));
kACCOUNT,
kSEQ
)
);
auto const handler = AnyHandler{AccountNFTsHandler{backend_}};
runSpawn([&](auto yield) {
auto const output = handler.process(kINPUT, Context{yield});
@@ -260,12 +266,14 @@ TEST_F(RPCAccountNFTsHandlerTest, AccountNotFound)
ON_CALL(*backend_, doFetchLedgerObject).WillByDefault(Return(std::optional<Blob>{}));
EXPECT_CALL(*backend_, doFetchLedgerObject).Times(1);
static auto const kINPUT = json::parse(fmt::format(
R"JSON({{
static auto const kINPUT = json::parse(
fmt::format(
R"JSON({{
"account": "{}"
}})JSON",
kACCOUNT
));
kACCOUNT
)
);
auto const handler = AnyHandler{AccountNFTsHandler{backend_}};
runSpawn([&](auto yield) {
auto const output = handler.process(kINPUT, Context{yield});
@@ -323,12 +331,14 @@ TEST_F(RPCAccountNFTsHandlerTest, NormalPath)
.WillByDefault(Return(pageObject.getSerializer().peekData()));
EXPECT_CALL(*backend_, doFetchLedgerObject).Times(2);
static auto const kINPUT = json::parse(fmt::format(
R"JSON({{
static auto const kINPUT = json::parse(
fmt::format(
R"JSON({{
"account": "{}"
}})JSON",
kACCOUNT
));
kACCOUNT
)
);
auto const handler = AnyHandler{AccountNFTsHandler{backend_}};
runSpawn([&](auto yield) {
auto const output = handler.process(kINPUT, Context{yield});
@@ -357,14 +367,16 @@ TEST_F(RPCAccountNFTsHandlerTest, Limit)
.WillByDefault(Return(pageObject.getSerializer().peekData()));
EXPECT_CALL(*backend_, doFetchLedgerObject).Times(1 + kLIMIT);
static auto const kINPUT = json::parse(fmt::format(
R"JSON({{
static auto const kINPUT = json::parse(
fmt::format(
R"JSON({{
"account": "{}",
"limit": {}
}})JSON",
kACCOUNT,
kLIMIT
));
kACCOUNT,
kLIMIT
)
);
auto const handler = AnyHandler{AccountNFTsHandler{backend_}};
runSpawn([&](auto yield) {
auto const output = handler.process(kINPUT, Context{yield});
@@ -392,14 +404,16 @@ TEST_F(RPCAccountNFTsHandlerTest, Marker)
.WillByDefault(Return(pageObject.getSerializer().peekData()));
EXPECT_CALL(*backend_, doFetchLedgerObject).Times(2);
static auto const kINPUT = json::parse(fmt::format(
R"JSON({{
static auto const kINPUT = json::parse(
fmt::format(
R"JSON({{
"account": "{}",
"marker": "{}"
}})JSON",
kACCOUNT,
kPAGE
));
kACCOUNT,
kPAGE
)
);
auto const handler = AnyHandler{AccountNFTsHandler{backend_}};
runSpawn([&](auto yield) {
auto const output = handler.process(kINPUT, Context{yield});
@@ -419,14 +433,16 @@ TEST_F(RPCAccountNFTsHandlerTest, InvalidMarker)
ON_CALL(*backend_, doFetchLedgerObject(ripple::keylet::account(accountID).key, 30, _))
.WillByDefault(Return(accountObject.getSerializer().peekData()));
static auto const kINPUT = json::parse(fmt::format(
R"JSON({{
static auto const kINPUT = json::parse(
fmt::format(
R"JSON({{
"account": "{}",
"marker": "{}"
}})JSON",
kACCOUNT,
kINVALID_PAGE
));
kACCOUNT,
kINVALID_PAGE
)
);
auto const handler = AnyHandler{AccountNFTsHandler{backend_}};
runSpawn([&](auto yield) {
auto const output = handler.process(kINPUT, Context{yield});
@@ -448,12 +464,14 @@ TEST_F(RPCAccountNFTsHandlerTest, AccountWithNoNFT)
ON_CALL(*backend_, doFetchLedgerObject(ripple::keylet::account(accountID).key, 30, _))
.WillByDefault(Return(accountObject.getSerializer().peekData()));
static auto const kINPUT = json::parse(fmt::format(
R"JSON({{
static auto const kINPUT = json::parse(
fmt::format(
R"JSON({{
"account": "{}"
}})JSON",
kACCOUNT
));
kACCOUNT
)
);
auto const handler = AnyHandler{AccountNFTsHandler{backend_}};
runSpawn([&](auto yield) {
auto const output = handler.process(kINPUT, Context{yield});
@@ -480,14 +498,16 @@ TEST_F(RPCAccountNFTsHandlerTest, invalidPage)
.WillByDefault(Return(accountObject.getSerializer().peekData()));
EXPECT_CALL(*backend_, doFetchLedgerObject).Times(2);
static auto const kINPUT = json::parse(fmt::format(
R"JSON({{
static auto const kINPUT = json::parse(
fmt::format(
R"JSON({{
"account": "{}",
"marker": "{}"
}})JSON",
kACCOUNT,
kPAGE
));
kACCOUNT,
kPAGE
)
);
auto const handler = AnyHandler{AccountNFTsHandler{backend_}};
runSpawn([&](auto yield) {
auto const output = handler.process(kINPUT, Context{yield});
@@ -546,14 +566,16 @@ TEST_F(RPCAccountNFTsHandlerTest, LimitLessThanMin)
.WillByDefault(Return(pageObject.getSerializer().peekData()));
EXPECT_CALL(*backend_, doFetchLedgerObject).Times(2);
static auto const kINPUT = json::parse(fmt::format(
R"JSON({{
static auto const kINPUT = json::parse(
fmt::format(
R"JSON({{
"account": "{}",
"limit": {}
}})JSON",
kACCOUNT,
AccountNFTsHandler::kLIMIT_MIN - 1
));
kACCOUNT,
AccountNFTsHandler::kLIMIT_MIN - 1
)
);
auto const handler = AnyHandler{AccountNFTsHandler{backend_}};
runSpawn([&](auto yield) {
auto const output = handler.process(kINPUT, Context{yield});
@@ -610,14 +632,16 @@ TEST_F(RPCAccountNFTsHandlerTest, LimitMoreThanMax)
.WillByDefault(Return(pageObject.getSerializer().peekData()));
EXPECT_CALL(*backend_, doFetchLedgerObject).Times(2);
static auto const kINPUT = json::parse(fmt::format(
R"JSON({{
static auto const kINPUT = json::parse(
fmt::format(
R"JSON({{
"account": "{}",
"limit": {}
}})JSON",
kACCOUNT,
AccountNFTsHandler::kLIMIT_MAX + 1
));
kACCOUNT,
AccountNFTsHandler::kLIMIT_MAX + 1
)
);
auto const handler = AnyHandler{AccountNFTsHandler{backend_}};
runSpawn([&](auto yield) {
auto const output = handler.process(kINPUT, Context{yield});