mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-09 01:52:41 +00:00
update code style docs
This commit is contained in:
parent
349dae3503
commit
fbe1e35b74
@ -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:
|
The following versions of the above tools are used:
|
||||||
|
|
||||||
- ``black == 12.6b0``
|
- ``black == 22.3.0``
|
||||||
- ``flake8 == 3.9.2``
|
- ``flake8 == 5.0.4``
|
||||||
- ``isort == 5.9.2``
|
- ``isort == 5.10.1``
|
||||||
|
|
||||||
After running the following commands:
|
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
|
If you want to check the style of your code before ``git commit``, you
|
||||||
can do the following:
|
can do the following:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
$ pre-commit install
|
||||||
|
$ pre-commit run
|
||||||
|
|
||||||
|
Or without installing the pre-commit hooks:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
$ cd icefall
|
$ 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 --check your_changed_file.py
|
||||||
$ black your_changed_file.py # modify it in-place
|
$ black your_changed_file.py # modify it in-place
|
||||||
$
|
$
|
||||||
|
Loading…
x
Reference in New Issue
Block a user