Skip to content

Commit 306f911

Browse files
authored
Merge pull request numpy#27218 from jorenham/dev/editorconfig-python
DEV: Add ``.editorconfig`` rules for Python
2 parents 240b36f + 40994c7 commit 306f911

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,21 @@ indent_size = 4
66
indent_style = space
77
max_line_length = 80
88
trim_trailing_whitespace = true
9+
10+
[*.{py,pyi,pxd}]
11+
# https://peps.python.org/pep-0008/
12+
charset = utf-8
13+
end_of_line = lf
14+
indent_size = 4
15+
indent_style = space
16+
insert_final_newline = true
17+
trim_trailing_whitespace = true
18+
19+
[*.py]
20+
# Keep in sync with `tools/lint_diff.ini` and `tools/linter.py`
21+
# https://pycodestyle.pycqa.org/en/latest/intro.html#configuration
22+
max_line_length = 88
23+
24+
[*.pyi]
25+
# https://typing.readthedocs.io/en/latest/guides/writing_stubs.html#style-guide
26+
max_line_length = 130

0 commit comments

Comments
 (0)