Skip to content

Commit abe0ea9

Browse files
authored
Merge pull request #87 from aerostack2/python-formatter
Python formatter
2 parents 74d7252 + 0c3e90f commit abe0ea9

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/_09_development/_develop_guide/_develop_guide/_setting_code.rst

+17
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Install the following required extensions from the 'Extensions' tab in VSCode:
1717
* ``mine.cpplint``
1818
* ``ms-python.autopep8``
1919
* ``ms-python.pylint``
20+
* ``charliermarsh.ruff``
21+
* ``ms-python.isort``
2022

2123

2224
.. _development_guide_code_settings:
@@ -74,6 +76,21 @@ Open your ``settings.json`` file from VSCode and add the following content to it
7476
"--max-line-length=99", "--import-order-style=google", "--show-source=true",
7577
"--statistics=true"],
7678
79+
"ruff.lineLength": 99,
80+
"ruff.organizeImports": false,
81+
"ruff.configuration" : {
82+
"format" : {
83+
"quote-style" : "single",
84+
"line-ending" : "auto",
85+
},
86+
},
87+
// isort to enforce propper import order
88+
"isort.args": ["--line-length", "99", "--force-alphabetical-sort-within-sections", "--profile", "black", "--force-sort-within-sections"],
89+
"pylint.args": ["--disable=B902,C816,D100,D101,D102,D103,D104,D105,D106,D107,D203,D212,D404,I202",
90+
"--max-line-length=99", "--import-order-style=google", "--show-source=true",
91+
"--statistics=true"
92+
]
93+
7794
Newer versions of ROS 2 include upgraded flake8 (in ament_flake8), so it is preferable to use
7895
flake8 from VSCode too instead of pylint. To do so, use, instead of the 'pylint.args' settings,
7996
the following settings:

0 commit comments

Comments
 (0)