diff options
author | Cristián Maureira-Fredes <[email protected]> | 2023-04-06 14:46:39 +0200 |
---|---|---|
committer | Cristián Maureira-Fredes <[email protected]> | 2023-04-07 12:59:36 +0200 |
commit | 46ff40c060f8db8a613c673145605f72b9c1f465 (patch) | |
tree | 33647b33b31386b952569828444bc5a5cff5ec26 | |
parent | 3b422792050334ce26f9267c2dbb3580c5e0d7e3 (diff) |
doc: add tools recommendations for examples
Including a reference to flake8 and ruff to find issues
with the code styling of the new examples, and encouraging
users to use isort to order imports.
Change-Id: I128a0d2712d10f39a1debe49bfdb16f24690e493
Pick-to: 6.5
Reviewed-by: Friedemann Kleint <[email protected]>
-rw-r--r-- | sources/pyside6/doc/developer/add_port_example.rst | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/sources/pyside6/doc/developer/add_port_example.rst b/sources/pyside6/doc/developer/add_port_example.rst index 6ddd1f0f2..d599e50bf 100644 --- a/sources/pyside6/doc/developer/add_port_example.rst +++ b/sources/pyside6/doc/developer/add_port_example.rst @@ -10,6 +10,22 @@ You can either design an example from scratch or inspired in another application, or simply you can port an existing Qt example that does not have a Python counterpart. +For both cases, we recommend you to use tools like +`flake8 <https://pypi.org/project/flake8/>`_ +(or `ruff <https://pypi.org/project/ruff/>`_) to detect issues with your code. +Keep in mind we do allow 100 columns for line length. +Additionally, please use `isort <https://pypi.org/project/isort/>`_ to keep the +imports ordered and consistent with other examples. + +For example: + +.. code-block:: bash + + $ flake8 --ignore=E266 your_file.py + $ isort your_file.py + + + Add a new example ----------------- @@ -35,5 +51,4 @@ Port a Qt example and a screenshot if suitable (use ``optipng`` to reduce file size). - Add the ``"""Port of the ... example from Qt 6"""`` doc string. - Try to port variable and function names to snake case convention. -- Verify that a flake check is mostly silent. - Remove C++ documentation from ``sources/pyside6/doc/additionaldocs.lst``. |