From fbe1e35b74e3ae593e3798e1a56e9d5b708a6767 Mon Sep 17 00:00:00 2001 From: Desh Raj Date: Fri, 18 Nov 2022 09:24:07 -0500 Subject: [PATCH] update code style docs --- docs/source/contributing/code-style.rst | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/source/contributing/code-style.rst b/docs/source/contributing/code-style.rst index 7d61a3ba1..3baaaeec2 100644 --- a/docs/source/contributing/code-style.rst +++ b/docs/source/contributing/code-style.rst @@ -11,9 +11,9 @@ We use the following tools to make the code style to be as consistent as possibl The following versions of the above tools are used: - - ``black == 12.6b0`` - - ``flake8 == 3.9.2`` - - ``isort == 5.9.2`` + - ``black == 22.3.0`` + - ``flake8 == 5.0.4`` + - ``isort == 5.10.1`` After running the following commands: @@ -54,10 +54,17 @@ it should succeed this time: If you want to check the style of your code before ``git commit``, you can do the following: + .. code-block:: bash + + $ pre-commit install + $ pre-commit run + +Or without installing the pre-commit hooks: + .. code-block:: bash $ cd icefall - $ pip install black==21.6b0 flake8==3.9.2 isort==5.9.2 + $ pip install black==22.3.0 flake8==5.0.4 isort==5.10.1 $ black --check your_changed_file.py $ black your_changed_file.py # modify it in-place $