mirror of
https://github.com/CLIUtils/CLI11.git
synced 2025-05-03 14:03:52 +00:00
chore(deps): pre-commit.ci autoupdate (#1020)
<!--pre-commit.ci start--> updates: - [github.com/psf/black: 24.2.0 → 24.3.0](https://github.com/psf/black/compare/24.2.0...24.3.0) - [github.com/pre-commit/mirrors-clang-format: v17.0.6 → v18.1.1](https://github.com/pre-commit/mirrors-clang-format/compare/v17.0.6...v18.1.1) <!--pre-commit.ci end--> --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
6cd171ad3f
commit
dc93d7a50c
@ -5,7 +5,7 @@ ci:
|
|||||||
|
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/psf/black
|
- repo: https://github.com/psf/black
|
||||||
rev: 24.2.0
|
rev: 24.3.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ repos:
|
|||||||
- id: debug-statements
|
- id: debug-statements
|
||||||
|
|
||||||
- repo: https://github.com/pre-commit/mirrors-clang-format
|
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||||
rev: v17.0.6
|
rev: v18.1.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: clang-format
|
- id: clang-format
|
||||||
types_or: [c++, c, cuda]
|
types_or: [c++, c, cuda]
|
||||||
|
@ -166,7 +166,7 @@ template <typename T, typename C> class is_direct_constructible {
|
|||||||
#pragma diag_suppress 2361
|
#pragma diag_suppress 2361
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
TT{std::declval<CC>()}
|
TT{std::declval<CC>()}
|
||||||
#ifdef __CUDACC__
|
#ifdef __CUDACC__
|
||||||
#ifdef __NVCC_DIAG_PRAGMA_SUPPORT__
|
#ifdef __NVCC_DIAG_PRAGMA_SUPPORT__
|
||||||
#pragma nv_diag_default 2361
|
#pragma nv_diag_default 2361
|
||||||
@ -174,8 +174,8 @@ template <typename T, typename C> class is_direct_constructible {
|
|||||||
#pragma diag_default 2361
|
#pragma diag_default 2361
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
,
|
,
|
||||||
std::is_move_assignable<TT>());
|
std::is_move_assignable<TT>());
|
||||||
|
|
||||||
template <typename TT, typename CC> static auto test(int, std::false_type) -> std::false_type;
|
template <typename TT, typename CC> static auto test(int, std::false_type) -> std::false_type;
|
||||||
|
|
||||||
|
@ -279,8 +279,8 @@ App::set_version_flag(std::string flag_name, std::function<std::string()> vfunc,
|
|||||||
|
|
||||||
// Empty name will simply remove the version flag
|
// Empty name will simply remove the version flag
|
||||||
if(!flag_name.empty()) {
|
if(!flag_name.empty()) {
|
||||||
version_ptr_ = add_flag_callback(
|
version_ptr_ =
|
||||||
flag_name, [vfunc]() { throw(CLI::CallForVersion(vfunc(), 0)); }, version_help);
|
add_flag_callback(flag_name, [vfunc]() { throw(CLI::CallForVersion(vfunc(), 0)); }, version_help);
|
||||||
version_ptr_->configurable(false);
|
version_ptr_->configurable(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1308,8 +1308,7 @@ TEST_CASE("TVersion: help", "[help]") {
|
|||||||
auto hvers = app.help();
|
auto hvers = app.help();
|
||||||
CHECK_THAT(hvers, Contains("help_for_version"));
|
CHECK_THAT(hvers, Contains("help_for_version"));
|
||||||
|
|
||||||
app.set_version_flag(
|
app.set_version_flag("-v", []() { return std::string("VERSION2 " CLI11_VERSION); }, "help_for_version2");
|
||||||
"-v", []() { return std::string("VERSION2 " CLI11_VERSION); }, "help_for_version2");
|
|
||||||
hvers = app.help();
|
hvers = app.help();
|
||||||
CHECK_THAT(hvers, Contains("help_for_version2"));
|
CHECK_THAT(hvers, Contains("help_for_version2"));
|
||||||
}
|
}
|
||||||
|
@ -1058,11 +1058,8 @@ TEST_CASE("RegEx: SplittingNew", "[helpers]") {
|
|||||||
CHECK_THROWS_AS([&]() { std::tie(shorts, longs, pname) = CLI::detail::get_names({"-hi"}); }(), CLI::BadNameString);
|
CHECK_THROWS_AS([&]() { std::tie(shorts, longs, pname) = CLI::detail::get_names({"-hi"}); }(), CLI::BadNameString);
|
||||||
CHECK_THROWS_AS([&]() { std::tie(shorts, longs, pname) = CLI::detail::get_names({"---hi"}); }(),
|
CHECK_THROWS_AS([&]() { std::tie(shorts, longs, pname) = CLI::detail::get_names({"---hi"}); }(),
|
||||||
CLI::BadNameString);
|
CLI::BadNameString);
|
||||||
CHECK_THROWS_AS(
|
CHECK_THROWS_AS([&]() { std::tie(shorts, longs, pname) = CLI::detail::get_names({"one", "two"}); }(),
|
||||||
[&]() {
|
CLI::BadNameString);
|
||||||
std::tie(shorts, longs, pname) = CLI::detail::get_names({"one", "two"});
|
|
||||||
}(),
|
|
||||||
CLI::BadNameString);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("String: ToLower", "[helpers]") { CHECK("one and two" == CLI::detail::to_lower("one And TWO")); }
|
TEST_CASE("String: ToLower", "[helpers]") { CHECK("one and two" == CLI::detail::to_lower("one And TWO")); }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user