Skip to content

Commit 6bd3c0a

Browse files
authored
Merge pull request #144 from steve-downey/update-precommit
Update precommit
2 parents ed2413e + fe0342d commit 6bd3c0a

File tree

8 files changed

+23
-27
lines changed

8 files changed

+23
-27
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v5.0.0
5+
rev: v6.0.0
66
hooks:
77
- id: trailing-whitespace
88
- id: end-of-file-fixer
@@ -13,14 +13,14 @@ repos:
1313
# This brings in a portable version of clang-format.
1414
# See also: https://github.com/ssciwr/clang-format-wheel
1515
- repo: https://github.com/pre-commit/mirrors-clang-format
16-
rev: v18.1.8
16+
rev: v21.1.2
1717
hooks:
1818
- id: clang-format
1919
types_or: [c++, c]
2020

2121
# CMake linting and formatting
2222
- repo: https://github.com/BlankSpruce/gersemi
23-
rev: 0.17.0
23+
rev: 0.22.3
2424
hooks:
2525
- id: gersemi
2626
name: CMake linting
@@ -36,7 +36,7 @@ repos:
3636

3737
# Config file: .codespell_ignore
3838
- repo: https://github.com/codespell-project/codespell
39-
rev: v2.3.0
39+
rev: v2.4.1
4040
hooks:
4141
- id: codespell
4242
args: ['-I', '.codespell_ignore', '--uri-ignore-words-list', '*']

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ if(OPTIONAL_ENABLE_TESTING)
3737
beman_optional_test
3838
PRIVATE
3939
FILE_SET beman_optional_test_headers
40-
TYPE HEADERS
41-
BASE_DIRS tests
40+
TYPE HEADERS
41+
BASE_DIRS tests
4242
)
4343
# Tests
4444
add_subdirectory(tests/beman/optional)

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ papers:
9696
.DEFAULT: $(_build_path)/CMakeCache.txt ## Other targets passed through to cmake
9797
cmake --build $(_build_path) --config $(CONFIG) --target $@ -- -k 0
9898

99-
PYEXECPATH ?= $(shell which python3.12 || which python3.11 || which python3.10 || which python3.9 || which python3.8 || which python3.7 || which python3)
99+
PYEXECPATH ?= $(shell which python3.13 || which python3.12 || which python3.11 || which python3.10 || which python3.9 || which python3.8 || which python3)
100100
PYTHON ?= $(notdir $(PYEXECPATH))
101101
VENV := .venv
102102
ACTIVATE := . $(VENV)/bin/activate &&

examples/CMakeLists.txt

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,8 @@ foreach(example ${EXAMPLES})
3030

3131
# Install .
3232
install(
33-
TARGETS
34-
${example}
35-
COMPONENT
36-
beman_optional_examples
37-
DESTINATION
38-
${CMAKE_INSTALL_BINDIR}
33+
TARGETS ${example}
34+
COMPONENT beman_optional_examples
35+
DESTINATION ${CMAKE_INSTALL_BINDIR}
3936
)
4037
endforeach()

include/beman/optional/CMakeLists.txt

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ target_sources(
55
beman_optional
66
PUBLIC
77
FILE_SET beman_optional_headers
8-
TYPE HEADERS
9-
FILES
10-
optional.hpp
11-
detail/iterator.hpp
12-
detail/stl_interfaces/config.hpp
13-
detail/stl_interfaces/fwd.hpp
14-
detail/stl_interfaces/iterator_interface.hpp
8+
TYPE HEADERS
9+
FILES
10+
optional.hpp
11+
detail/iterator.hpp
12+
detail/stl_interfaces/config.hpp
13+
detail/stl_interfaces/fwd.hpp
14+
detail/stl_interfaces/iterator_interface.hpp
1515
)
1616

1717
install(
@@ -24,8 +24,7 @@ install(
2424
install(
2525
TARGETS beman_optional
2626
EXPORT beman_optional_export
27-
DESTINATION
28-
${CMAKE_INSTALL_LIBDIR}
27+
DESTINATION ${CMAKE_INSTALL_LIBDIR}
2928
FILE_SET beman_optional_headers
3029
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
3130
COMPONENT beman_optional_development

include/beman/optional/detail/stl_interfaces/iterator_interface.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ BEMAN_OPTIONAL_DETAIL_STL_INTERFACES_NAMESPACE_V1 {
229229
template <typename D = Derived>
230230
constexpr auto operator->() const
231231
noexcept(noexcept(detail::make_pointer<pointer, reference>(*std::declval<const D&>())))
232-
-> decltype(detail::make_pointer<pointer, reference>(*std::declval<const D&>())) {
232+
-> decltype(detail::make_pointer<pointer, reference>(*std::declval<const D&>())) {
233233
return detail::make_pointer<pointer, reference>(*derived());
234234
}
235235

papers/P2988/optional_ref.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ class optional<T&> {
132132
}
133133

134134
template <class F>
135-
constexpr auto
136-
transform(F&& f) const -> optional<std::invoke_result_t<F, T&>> {
135+
constexpr auto transform(F&& f) const
136+
-> optional<std::invoke_result_t<F, T&>> {
137137
using U = std::invoke_result_t<F, T&>;
138138
return (has_value())
139139
? optional<U>{std::invoke(std::forward<F>(f), *value_)}

tests/beman/optional/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ target_sources(
1818
beman_optional_test
1919
PRIVATE
2020
FILE_SET beman_optional_test_headers
21-
TYPE HEADERS
22-
FILES test_types.hpp test_utilities.hpp
21+
TYPE HEADERS
22+
FILES test_types.hpp test_utilities.hpp
2323
)
2424

2525
target_link_libraries(

0 commit comments

Comments
 (0)