Exercise
In this chapter, you learned how to document code, use Sphinx to generate documentation, and analyze the code using tools such as Pylint. Here is an exercise that covers these three aspects:
- Download the code illustrated in Chapter 3, Modularize, Package, Deploy (you can also use your own Python code instead).
- Write docstrings for this code (be sure to write docstrings at module, class, and method/function levels). You can use the default RST format to write the docstring or choose the Google Python Style Guide.
- Generate an HTML documentation using Sphinx.
- Run code analysis, using Pylint or any other tool, to fix coding errors and style problems.
The supporting code for this chapter is already documented to an extent. You can use this code as a reference and also try to improve the existing documentation further.