Skip to content

Commit a50e68a

Browse files
authored
Docs: style: multiline brackets (#3143)
1 parent 0624ba5 commit a50e68a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/style.md

+9
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@
1717
* Use type annotations where possible for function signatures and class members.
1818
* Use type annotations where appropriate for local variables (e.g. `var: List[int] = []`, or when the
1919
type is hard or impossible to deduce.) Clear annotations help developers look up and validate API calls.
20+
* If a line ends with an open bracket/brace/parentheses, the matching closing bracket should be at the
21+
beginning of a line at the same indentation as the beginning of the line with the open bracket.
22+
```python
23+
stuff = {
24+
x: y
25+
for x, y in thing
26+
if y > 2
27+
}
28+
```
2029
* New classes, attributes, and methods in core code should have docstrings that follow
2130
[reST style](https://peps.python.org/pep-0287/).
2231
* Worlds that do not follow PEP8 should still have a consistent style across its files to make reading easier.

0 commit comments

Comments
 (0)