From c1332f68b31ce553a663ef85829c13dadd064d0f Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Mon, 23 Jan 2023 19:58:39 +0100 Subject: [PATCH] Small adjustments to API docs config (#86474) --- docs/source/conf.py | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 5648967098b..302a0655544 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -1,21 +1,20 @@ #!/usr/bin/env python3 -# -# Home-Assistant documentation build configuration file, created by -# sphinx-quickstart on Sun Aug 28 13:13:10 2016. -# -# This file is execfile()d with the current directory set to its -# containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. +"""Home Assistant documentation build configuration file. + +This file is execfile()d with the current directory set to its +containing dir. + +Note that not all possible configuration values are present in this +autogenerated file. + +All configuration values have a default; values that are commented out +serve to show the default. + +If extensions (or modules to document with autodoc) are in another directory, +add these directories to sys.path here. If the directory is relative to the +documentation root, use os.path.abspath to make it absolute, like shown here. +""" -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -# import inspect import os import sys @@ -110,17 +109,17 @@ def linkcode_resolve(domain, info): for part in fullname.split("."): try: obj = getattr(obj, part) - except: + except Exception: # pylint: disable=broad-except return None try: fn = inspect.getsourcefile(obj) - except: + except Exception: # pylint: disable=broad-except fn = None if not fn: return None try: source, lineno = inspect.findsource(obj) - except: + except Exception: # pylint: disable=broad-except lineno = None if lineno: linespec = "#L%d" % (lineno + 1)