In the conf.py where make all modifications with regards to specific documentation remove the sphinx.ext.viewcode extension.
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.viewcode',
'rst2pdf.pdfbuilder'
]
The above was modified to
extensions = [
'sphinx.ext.autodoc',
'rst2pdf.pdfbuilder'
]