Managed to properly exclude the ccllib.py file from the autodoc.
@@ -95,7 +95,7 @@ language = None
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
-exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
+exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'api/pyccl.ccllib.rst']
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
