Re: TianoCore Community Design Meeting Minutes - Sep 19

Purma, Kondal R

Oh ok I understand the confusion. Let me provide more details.

In presentation slides we gave the initial background on topics to cover python code static analysis, so added PEP8, PEP257 as reference standards.
Then recommended flake8 which wraps the following and cover all our requirements:

* PyFlakes -- A simple program which checks Python source files for errors
* Pycodestyle -- pycodestyle is a tool to check your Python code against some of the style conventions in PEP 8<>
* Ned Batchelder's McCabe script: Ned's script to check McCabe complexity
From: Rebecca Cran <rebecca@...>
Sent: Tuesday, September 24, 2019 8:05 AM
To: Purma, Kondal R <kondal.r.purma@...>
Cc: Ni, Ray <>;; Sean Brogan <sean.brogan@...>; Kinney, Michael D <michael.d.kinney@...>
Subject: Re: [edk2-announce] TianoCore Community Design Meeting Minutes - Sep 19

I mentioned pylama because in addition to flake8, the meeting notes also mention mccabe and pep8 tools, which pylama wraps.

On Sep 24, 2019, at 12:41 AM, Purma, Kondal R <kondal.r.purma@...<mailto:kondal.r.purma@...>> wrote:


Pylama definitely a good implementation available in python world and additionally it also does java script checking(which is not applicable to EDK2), however I feel flake8 might be suitable enough for EDKII or build related tools environment.

I feel falke8 is right choice because we can develop plugin for typical use cases only applicable to firmware development .

We already using flake8 for “edk2-pytool-extensions”, so a common set of tools may be make more sense.

Appreciate your thoughts on this further .


From: Rebecca Cran <rebecca@...<mailto:rebecca@...>>
Sent: Friday, September 20, 2019 5:32 PM
To: Ni, Ray <<>>;<>
Cc: Purma, Kondal R <kondal.r.purma@...<mailto:kondal.r.purma@...>>; Sean Brogan <sean.brogan@...<mailto:sean.brogan@...>>; Kinney, Michael D <michael.d.kinney@...<mailto:michael.d.kinney@...>>
Subject: Re: [edk2-announce] TianoCore Community Design Meeting Minutes - Sep 19

On 2019-09-20 12:48, Ni, Ray wrote:

* Proposal: Python development process flow chart

Page #4

Code style: PEP 8

Docstring: PEP 257

Code checker: flake8

Page #6, #7 for detailed flake8 config

Docstring checker: flake8-docstrings

unittest: python unittest library

code complexity measure:

Unfortunately I missed the meeting, but as I've said in the past on the devel mailing list, I'd suggest using pylama:

Code audit tool for Python and JavaScript. Pylama wraps these tools:

* pycodestyle<> (formerly pep8) © 2012-2013, Florent Xicluna;
* pydocstyle<> (formerly pep257 by Vladimir Keleshev) © 2014, Amir Rachum;
* PyFlakes<> © 2005-2013, Kevin Watters;
* Mccabe<> © Ned Batchelder;
* Pylint<> © 2013, Logilab (should be installed 'pylama_pylint' module);
* Radon<> © Michele Lacchia
* gjslint<> © The Closure Linter Authors (should be installed 'pylama_gjslint' module);
* eradicate<> © Steven Myint;
* Mypy<> © Jukka Lehtosalo and contributors;

Rebecca Cran

Join to automatically receive all group messages.