Skip to content

Commit 86f2e11

Browse files
committed
update max line length to120 everywhere
1 parent d5354c2 commit 86f2e11

File tree

6 files changed

+33
-36
lines changed

6 files changed

+33
-36
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ insert_final_newline = true
88
indent_style = space
99
indent_size = 4
1010
charset = utf-8
11-
max_line_length = 180
11+
max_line_length = 120
1212

1313
[*.{bat,cmd,ps1}]
1414
end_of_line = crlf

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ In short, this is how that works.
3737
```
3838

3939
5. Start making your changes to the **master** branch (or branch off of it).
40-
6. Auto-format your code using `black -l 180 <path_to_source_file>`.
40+
6. Auto-format your code using `black <path_to_source_file>`.
4141
7. Make sure all tests still pass:
4242

4343
```bash

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ include AUTHORS.md
1313
include CHANGELOG.md
1414
include requirements.txt
1515
include conftest.py
16+
include pyproject.toml
1617

1718
exclude requirements-dev.txt
1819
exclude pytest.ini .bumpversion.cfg .editorconfig

docs/devguide.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ The procedure for submitting a PR is the following.
7474
Style guide
7575
===========
7676

77-
Please run `black -l 180 <path_to_source_file>` to auto-format your code.
77+
Please run `black <path_to_source_file>` to auto-format your code.
7878

7979
The command ``invoke lint`` runs the entire codebase through ``flake8``.
8080
As described in the `docs <https://flake8.pycqa.org/en/latest/manpage.html>`_,
@@ -88,7 +88,7 @@ https://flake8.pycqa.org/en/latest/user/error-codes.html
8888
The PEP-0008 style guide is available here:
8989
https://www.python.org/dev/peps/pep-0008/
9090

91-
Note that the maximum line length is set to 180 rather 79 in the ``setup.cfg`` of the repo.
91+
Note that the maximum line length is set to 120 rather 79 in the ``setup.cfg`` of the repo.
9292

9393

9494
Naming conventions

pyproject.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[tool.black]
2+
line-length = 120
3+
4+
[tool.pytest.ini_options]
5+
minversion = "6.0"
6+
testpaths = ["tests", "src/compas"]
7+
python_files = [
8+
"test_*.py",
9+
"tests.py"
10+
]
11+
addopts = "-ra --strict --doctest-modules --doctest-glob=*.rst --tb=short"
12+
doctest_optionflags= "NORMALIZE_WHITESPACE IGNORE_EXCEPTION_DETAIL ALLOW_UNICODE ALLOW_BYTES NUMBER"
13+
filterwarnings = "ignore::DeprecationWarning"
14+
15+
[tool.isort]
16+
line_length = 120
17+
multi_line_output = 3
18+
include_trailing_comma = true
19+
force_grid_wrap = 0
20+
use_parentheses = true
21+
force_single_line = true
22+
ensure_newline_before_comments = true
23+
known_first_party = "compas"
24+
default_section = "THIRDPARTY"
25+
forced_separate = "test_compas"
26+
skip = ["__init__.py"]

setup.cfg

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,13 @@
22
universal = 1
33

44
[flake8]
5-
max-line-length = 180
5+
max-line-length = 120
66
exclude = */migrations/*
77
extend-ignore = E203
88

99
[doc8]
10-
max-line-length = 180
10+
max-line-length = 120
1111
ignore = D001
1212

1313
[pydocstyle]
1414
convention = numpy
15-
16-
[tool:pytest]
17-
testpaths =
18-
tests
19-
src/compas
20-
norecursedirs =
21-
migrations
22-
python_files =
23-
test_*.py
24-
*_test.py
25-
tests.py
26-
addopts =
27-
-ra
28-
--strict
29-
--doctest-glob=\*.rst
30-
--tb=short
31-
doctest_optionflags =
32-
NORMALIZE_WHITESPACE
33-
IGNORE_EXCEPTION_DETAIL
34-
ALLOW_UNICODE
35-
ALLOW_BYTES
36-
NUMBER
37-
38-
[isort]
39-
force_single_line = True
40-
line_length = 180
41-
known_first_party = compas
42-
default_section = THIRDPARTY
43-
forced_separate = test_compas
44-
skip = migrations, __init__.py

0 commit comments

Comments
 (0)