Changes between Version 28 and Version 29 of Submitting/Python


Ignore:
Timestamp:
Mar 21, 2020, 3:48:20 AM (4 years ago)
Author:
neteler
Comment:

python3-pep8 --> python3-pycodestyle

Legend:

Unmodified
Added
Removed
Modified
  • Submitting/Python

    v28 v29  
    8282=== PEP8 standard Style ===
    8383
    84 Follow PEP8 standard and use the `pep8` tool to check compliance of your code to this standard. You can either install it with `pip3` or it is offered for your operating system as package `python3-pep8`.
     84Follow PEP8 standard and use the `pep8` tool to check compliance of your code to this standard. You can either install it with `pip3` or it is offered for your operating system as package ~~`python3-pep8`~~ `python3-pycodestyle`.
    8585
    8686Update 2020:
    87  * `pep8` has been renamed to `pycodestyle`
    88    * Use of the `pep8` tool will be removed in a future release. Please install and use `pycodestyle` instead.
     87 * `pep8` has been renamed to `pycodestyle-3`
     88   * Use of the `pep8` tool will be removed in future, please install and use `pycodestyle-3` instead.
    8989
    9090Note that not all code is currently compliant to complete PEP8, so we are using a custom configuration stored in `tools/pep8config.txt` ([https://github.com/OSGeo/grass/blob/master/tools/pep8config.txt here] shipped within the GRASS GIS source code), so use:
    9191
    9292{{{
    93 pep8 --config=tools/pep8config.txt directory_to_check
    94 }}}
    95 
    96 Alternatively, you can use `pep8` with `--diff` option to check just the parts of the code you have changed:
    97 
    98 {{{
    99 git diff | pep8 --diff --config=tools/pep8config.txt
    100 }}}
    101 
    102 The best practice is to use pep8 with default configuration (i.e., without custom configuration file) for new files and new code in old files.
     93pycodestyle-3 --config=grass_master/tools/pep8config.txt directory_to_check
     94}}}
     95
     96Alternatively, you can use `pycodestyle-3` with `--diff` option to check just the parts of the code you have changed:
     97
     98{{{
     99git diff | pycodestyle-3 --diff --config=grass_master/tools/pep8config.txt
     100}}}
     101
     102The best practice is to use `pycodestyle-3` with default configuration (i.e., without custom configuration file) for new files and new code in old files.
    103103
    104104Do not fix (intentionally or unintentionally) existing style issues in code (at lines) you are not changing.