File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
source/The-ROS2-Project/Contributing Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -338,6 +338,20 @@ We chose the following more precise rule where PEP 8 leaves some freedom:
338338* `We allow up to 100 characters per line (fifth paragraph) <https://www.python.org/dev/peps/pep-0008/#maximum-line-length >`_.
339339* `We pick single quotes over double quotes as long as no escaping is necessary <https://www.python.org/dev/peps/pep-0008/#string-quotes >`_.
340340* `We prefer hanging indents for continuation lines <https://www.python.org/dev/peps/pep-0008/#indentation >`_.
341+ * `We prefer splitting having only one import per line <https://peps.python.org/pep-0008/#imports >`_:
342+
343+ .. code-block :: python
344+
345+ # This is preferred
346+ from typing import Dict
347+ from typing import List
348+
349+ # over these
350+ from typing import Dict, List
351+ from typing import (
352+ Dict,
353+ List,
354+ )
341355
342356 Tools like the ``(ament_)pycodestyle `` Python package should be used in unit-test and/or editor integration for checking Python code style.
343357
You can’t perform that action at this time.
0 commit comments