We will perform static analysis of part of the NumPy codebase. To do this, we will check out the code using Git. We will then run static analysis on part of the code using pyflakes
.
To check out the NumPy code, we need Git. Installing Git is beyond the scope of this book (see http://git-scm.com/book/en/v2/Getting-Started-Installing-Git):
The Git command to retrieve the code is as follows:
$ git clone git://github.com/numpy/numpy.git numpy
Alternatively, download a source archive from https://github.com/numpy/numpy.
The previous step creates a
numpy
directory with the entire NumPy code. Go to this directory, and within it, run the following command:$ pyflakes *.py pavement.py:71: redefinition of unused 'md5' from line 69 pavement.py:88: redefinition of unused 'GIT_REVISION' from line 86 pavement.py:314: 'virtualenv' imported but unused pavement.py:315: local variable 'e' is assigned to but never used pavement.py:380: local variable 'sdir...