| 1 |
# A clang-format style that approximates Python's PEP 7 |
| 2 |
# Useful for IDE integration |
| 3 |
# |
| 4 |
# Based on Paul Ganssle's version at |
| 5 |
# https://gist.github.com/pganssle/0e3a5f828b4d07d79447f6ced8e7e4db |
| 6 |
# and modified for NumPy |
| 7 |
BasedOnStyle: Google |
| 8 |
AlignAfterOpenBracket: Align |
| 9 |
AllowShortEnumsOnASingleLine: false |
| 10 |
AllowShortIfStatementsOnASingleLine: false |
| 11 |
AlwaysBreakAfterReturnType: TopLevel |
| 12 |
BreakBeforeBraces: Stroustrup |
| 13 |
ColumnLimit: 88 |
| 14 |
ContinuationIndentWidth: 8 |
| 15 |
DerivePointerAlignment: false |
| 16 |
IndentWidth: 4 |
| 17 |
IncludeBlocks: Regroup |
| 18 |
IncludeCategories: |
| 19 |
- Regex: '^[<"](Python|structmember|pymem)\.h' |
| 20 |
Priority: -3 |
| 21 |
CaseSensitive: true |
| 22 |
- Regex: '^"numpy/' |
| 23 |
Priority: -2 |
| 24 |
- Regex: '^"(npy_pycompat|npy_config)' |
| 25 |
Priority: -1 |
| 26 |
- Regex: '^"[[:alnum:]_.]+"' |
| 27 |
Priority: 1 |
| 28 |
- Regex: '^<[[:alnum:]_.]+"' |
| 29 |
Priority: 2 |
| 30 |
IndentPPDirectives: AfterHash |
| 31 |
Language: Cpp |
| 32 |
PointerAlignment: Right |
| 33 |
ReflowComments: true |
| 34 |
SpaceBeforeParens: ControlStatements |
| 35 |
SpacesInParentheses: false |
| 36 |
StatementMacros: [PyObject_HEAD, PyObject_VAR_HEAD, PyObject_HEAD_EXTRA] |
| 37 |
TabWidth: 4 |
| 38 |
UseTab: Never |