[dpdk-dev,v2] doc: add pep8 as the python code style guidelines

Message ID 1464361035-4087-1-git-send-email-john.mcnamara@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers

Commit Message

John McNamara May 27, 2016, 2:57 p.m. UTC
  Added PEP8 to the DPDK Coding Style guidelines to cover Python
contributions to DPDK.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
---
v2: fixed section level.


 doc/guides/contributing/coding_style.rst | 8 ++++++++
 1 file changed, 8 insertions(+)
  

Comments

Bruce Richardson June 3, 2016, 10:51 a.m. UTC | #1
On Fri, May 27, 2016 at 03:57:15PM +0100, John McNamara wrote:
> Added PEP8 to the DPDK Coding Style guidelines to cover Python
> contributions to DPDK.
> 
> Signed-off-by: John McNamara <john.mcnamara@intel.com>
> ---
> v2: fixed section level.
> 
> 
>  doc/guides/contributing/coding_style.rst | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst
> index ad1392d..1eb67f3 100644
> --- a/doc/guides/contributing/coding_style.rst
> +++ b/doc/guides/contributing/coding_style.rst
> @@ -685,3 +685,11 @@ Control Statements
>                   usage();
>                   /* NOTREACHED */
>           }
> +
> +
> +Python Code
> +-----------
> +
> +All python code should be compliant with `PEP8 (Style Guide for Python Code) <https://www.python.org/dev/peps/pep-0008/>`_.
> +
> +The ``pep8`` tool can be used for testing compliance with the guidelines.
> -- 
Yep, I think this would be good to have, especially since there is a nice
public tool to help ensure people are compliant with this. Even though all
existing code is not (yet) compliant no reason new code shouldn't be.

Acked-by: Bruce Richardson <bruce.richardson@intel.com>
  
Thomas Monjalon June 7, 2016, 7:53 a.m. UTC | #2
2016-06-03 11:51, Bruce Richardson:
> On Fri, May 27, 2016 at 03:57:15PM +0100, John McNamara wrote:
> > Added PEP8 to the DPDK Coding Style guidelines to cover Python
> > contributions to DPDK.
> > 
> > Signed-off-by: John McNamara <john.mcnamara@intel.com>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Applied, thanks
  

Patch

diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst
index ad1392d..1eb67f3 100644
--- a/doc/guides/contributing/coding_style.rst
+++ b/doc/guides/contributing/coding_style.rst
@@ -685,3 +685,11 @@  Control Statements
                  usage();
                  /* NOTREACHED */
          }
+
+
+Python Code
+-----------
+
+All python code should be compliant with `PEP8 (Style Guide for Python Code) <https://www.python.org/dev/peps/pep-0008/>`_.
+
+The ``pep8`` tool can be used for testing compliance with the guidelines.