Update pre-commit versions (#6666)

Most versions are through `pre-commit autoupdate --freeze`, clang-format
was manually updated to the latest at
https://github.com/ssciwr/clang-format-wheel

My read of the style changes here are that they seem fine, none of them
look like regressions (which has caused me to delay/adjust updates in
the past).
This commit is contained in:
Jon Ross-Perkins
2026-01-28 22:47:18 +00:00
committed by GitHub
parent de4a2ee6c8
commit a376a2b27d
4 changed files with 19 additions and 18 deletions
+3 -3
View File
@@ -12,7 +12,7 @@ default_language_version:
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
@@ -90,7 +90,7 @@ repos:
types_or: [c++, def]
language: python
args: ['-i']
additional_dependencies: ['clang-format==20.1.8']
additional_dependencies: ['clang-format==21.1.8']
- repo: local
hooks:
@@ -134,7 +134,7 @@ repos:
hooks:
- id: flake8
- repo: https://github.com/pre-commit/mirrors-mypy
rev: '850d8bf806620ef89a99381c5cf5ea2c1ea826dd' # frozen: v1.17.0
rev: 'a66e98df7b4aeeb3724184b332785976d062b92e' # frozen: v1.19.1
hooks:
- id: mypy
# Use setup.cfg to match the command line.
+1 -2
View File
@@ -85,8 +85,7 @@ template <TemplateString Kind, TemplateString File, int Line,
#ifdef NDEBUG
[[noreturn]]
#endif
[[gnu::cold, clang::noinline]] auto
CheckFail(Ts&&... values) -> void {
[[gnu::cold, clang::noinline]] auto CheckFail(Ts&&... values) -> void {
if constexpr (llvm::StringRef(FormatStr).empty()) {
// Skip the format string rendering if empty. Note that we don't skip it
// even if there are no values as we want to have consistent handling of
+13 -11
View File
@@ -108,8 +108,8 @@ class MapView
// Lookup a key in the map and try to return a pointer to its value. Returns
// null on a missing key.
template <typename LookupKeyT>
auto operator[](LookupKeyT lookup_key) const
-> ValueT* requires(std::default_initializable<KeyContextT>);
auto operator[](LookupKeyT lookup_key) const -> ValueT*
requires(std::default_initializable<KeyContextT>);
// Run the provided callback for every key and value in the map.
template <typename CallbackT>
@@ -221,10 +221,11 @@ class MapBase : protected RawHashtable::BaseImpl<InputKeyT, InputValueT,
// Convenience forwarder to the view type.
template <typename LookupKeyT>
auto operator[](LookupKeyT lookup_key) const
-> ValueT* requires(std::default_initializable<KeyContextT>) {
return ViewT(*this)[lookup_key];
}
auto operator[](LookupKeyT lookup_key) const -> ValueT*
requires(std::default_initializable<KeyContextT>)
{
return ViewT(*this)[lookup_key];
}
// Convenience forwarder to the view type.
template <typename CallbackT>
@@ -415,11 +416,12 @@ auto MapView<InputKeyT, InputValueT, InputKeyContextT>::Lookup(
template <typename InputKeyT, typename InputValueT, typename InputKeyContextT>
template <typename LookupKeyT>
auto MapView<InputKeyT, InputValueT, InputKeyContextT>::operator[](
LookupKeyT lookup_key) const
-> ValueT* requires(std::default_initializable<KeyContextT>) {
auto result = Lookup(lookup_key, KeyContextT());
return result ? &result.value() : nullptr;
}
LookupKeyT lookup_key) const -> ValueT*
requires(std::default_initializable<KeyContextT>)
{
auto result = Lookup(lookup_key, KeyContextT());
return result ? &result.value() : nullptr;
}
template <typename InputKeyT, typename InputValueT, typename InputKeyContextT>
template <typename CallbackT>
+2 -2
View File
@@ -168,8 +168,8 @@ class IntId : public Printable<IntId> {
// comparison, and so all of this ends up carefully constructed to enable very
// small code size when testing for an embedded value and when that test fails
// computing and using the index.
static constexpr int32_t ZeroIndexId = std::numeric_limits<int32_t>::min() >>
(TokenIdBitsShift + 1);
static constexpr int32_t ZeroIndexId =
std::numeric_limits<int32_t>::min() >> (TokenIdBitsShift + 1);
// The minimum embedded value in an ID.
static constexpr int32_t MinValue = ZeroIndexId + 1;