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

@@ -107,13 +107,15 @@ struct MockPrometheusImpl : PrometheusInterface {
});
EXPECT_CALL(*this, histogramInt)
.WillRepeatedly(
[this](std::string name, Labels labels, std::vector<std::int64_t> const&, std::optional<std::string>)
-> HistogramInt& { return getMetric<HistogramInt>(std::move(name), std::move(labels)); }
[this](
std::string name, Labels labels, std::vector<std::int64_t> const&, std::optional<std::string>
) -> HistogramInt& { return getMetric<HistogramInt>(std::move(name), std::move(labels)); }
);
EXPECT_CALL(*this, histogramDouble)
.WillRepeatedly(
[this](std::string name, Labels labels, std::vector<double> const&, std::optional<std::string>)
-> HistogramDouble& { return getMetric<HistogramDouble>(std::move(name), std::move(labels)); }
[this](
std::string name, Labels labels, std::vector<double> const&, std::optional<std::string>
) -> HistogramDouble& { return getMetric<HistogramDouble>(std::move(name), std::move(labels)); }
);
}

View File

@@ -35,8 +35,9 @@
*/
class TestHttpServer {
public:
using RequestHandler = std::function<std::optional<boost::beast::http::response<
boost::beast::http::string_body>>(boost::beast::http::request<boost::beast::http::string_body>)>;
using RequestHandler = std::function<std::optional<boost::beast::http::response<boost::beast::http::string_body>>(
boost::beast::http::request<boost::beast::http::string_body>
)>;
/**
* @brief Construct a new TestHttpServer

View File

@@ -64,13 +64,16 @@ WebSocketSyncClient::connect(std::string const& host, std::string const& port, s
// See https://tools.ietf.org/html/rfc7230#section-5.4
auto const hostPort = host + ':' + std::to_string(ep.port());
ws_.set_option(boost::beast::websocket::stream_base::decorator([additionalHeaders = std::move(additionalHeaders
)](boost::beast::websocket::request_type& req) {
req.set(http::field::user_agent, std::string(BOOST_BEAST_VERSION_STRING) + " websocket-client-coro");
for (auto const& header : additionalHeaders) {
req.set(header.name, header.value);
}
}));
ws_.set_option(
boost::beast::websocket::stream_base::decorator(
[additionalHeaders = std::move(additionalHeaders)](boost::beast::websocket::request_type& req) {
req.set(http::field::user_agent, std::string(BOOST_BEAST_VERSION_STRING) + " websocket-client-coro");
for (auto const& header : additionalHeaders) {
req.set(header.name, header.value);
}
}
)
);
ws_.handshake(hostPort, "/");
}
@@ -157,12 +160,15 @@ WebSocketAsyncClient::connect(
stream_.set_option(wsTimeout);
boost::beast::get_lowest_layer(stream_).expires_never();
stream_.set_option(boost::beast::websocket::stream_base::decorator([additionalHeaders = std::move(additionalHeaders
)](boost::beast::websocket::request_type& req) {
for (auto const& header : additionalHeaders) {
req.set(header.name, header.value);
}
}));
stream_.set_option(
boost::beast::websocket::stream_base::decorator(
[additionalHeaders = std::move(additionalHeaders)](boost::beast::websocket::request_type& req) {
for (auto const& header : additionalHeaders) {
req.set(header.name, header.value);
}
}
)
);
stream_.async_handshake(fmt::format("{}:{}", host, port), "/", yield[error]);
if (error)