From a50e68acd1385e282e84d7fbd66802a558e86897 Mon Sep 17 00:00:00 2001 From: Doug Hoskisson Date: Sat, 20 Apr 2024 17:42:27 -0700 Subject: [PATCH] Docs: style: multiline brackets (#3143) --- docs/style.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/style.md b/docs/style.md index fbf681f2..81853f41 100644 --- a/docs/style.md +++ b/docs/style.md @@ -17,6 +17,15 @@ * Use type annotations where possible for function signatures and class members. * Use type annotations where appropriate for local variables (e.g. `var: List[int] = []`, or when the type is hard or impossible to deduce.) Clear annotations help developers look up and validate API calls. +* If a line ends with an open bracket/brace/parentheses, the matching closing bracket should be at the + beginning of a line at the same indentation as the beginning of the line with the open bracket. + ```python + stuff = { + x: y + for x, y in thing + if y > 2 + } + ``` * New classes, attributes, and methods in core code should have docstrings that follow [reST style](https://peps.python.org/pep-0287/). * Worlds that do not follow PEP8 should still have a consistent style across its files to make reading easier.