From 2aef265ff7be3bd908d657c4765e32984a2da38e Mon Sep 17 00:00:00 2001 From: Chris Modzelewski Date: Mon, 4 Nov 2024 13:39:52 -0500 Subject: [PATCH] Added details on environment variables to docstring for ExportServer.referer and ExportServer.user_agent properties. --- highcharts_core/headless_export.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/highcharts_core/headless_export.py b/highcharts_core/headless_export.py index 4d529d4..44ba137 100644 --- a/highcharts_core/headless_export.py +++ b/highcharts_core/headless_export.py @@ -107,7 +107,8 @@ def __init__(self, **kwargs): @property def referer(self) -> Optional[str]: - """The referer to use when making requests to the export server. Defaults to + """The referer to use when making requests to the export server. Defaults to the + ``HIGHCHARTS_EXPORT_SERVER_REFERER`` environment variable if present, otherwise defaults to ``'https://www.highcharts.com'``. :rtype: :class:`str ` or :obj:`None ` @@ -124,15 +125,15 @@ def referer(self, value): @property def user_agent(self) -> Optional[str]: - """The user agent to use when making requests to the export server. Defaults to - ``Highcharts for Python / v.. + """The user agent to use when making requests to the export server. Defaults to the ``HIGHCHARTS_EXPORT_SERVER_USER_AGENT`` environment variable if present, otherwise defaults to + ``Highcharts Core for Python / v.. :rtype: :class:`str ` or :obj:`None ` """ if self._user_agent: return self._user_agent - return f'Highcharts for Python / v.{highcharts_version.__version__}' + return f'Highcharts Core for Python / v.{highcharts_version.__version__}' @user_agent.setter def user_agent(self, value):