Skip to content

Commit d6dc7ce

Browse files
committed
style: adding clang-format as manual hook
1 parent 7b7ec66 commit d6dc7ce

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

.clang-format

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
# See all possible options and defaults with:
3+
# clang-format --style=llvm --dump-config
4+
BasedOnStyle: LLVM
5+
AccessModifierOffset: -4
6+
AlignConsecutiveAssignments: true
7+
AlwaysBreakTemplateDeclarations: Yes
8+
BinPackArguments: false
9+
BinPackParameters: false
10+
BreakBeforeBinaryOperators: All
11+
BreakConstructorInitializers: BeforeColon
12+
ColumnLimit: 99
13+
IndentCaseLabels: true
14+
IndentPPDirectives: AfterHash
15+
IndentWidth: 4
16+
Language: Cpp
17+
SpaceAfterCStyleCast: true
18+
# SpaceInEmptyBlock: true # too new
19+
Standard: Cpp11
20+
TabWidth: 4
21+
...

include/pybind11/iostream.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,10 @@ PYBIND11_NAMESPACE_END(detail)
104104
.. code-block:: cpp
105105
106106
{
107-
py::scoped_ostream_redirect output{std::cerr, py::module_::import("sys").attr("stderr")};
108-
std::cerr << "Hello, World!";
107+
py::scoped_ostream_redirect output{
108+
std::cerr,
109+
py::module::import("sys").attr("stderr")
110+
};
109111
}
110112
\endrst */
111113
class scoped_ostream_redirect {

0 commit comments

Comments
 (0)