docs: fix list type hints

This commit is contained in:
lucasheld 2022-12-29 01:17:45 +01:00
parent 9e3cbe7d59
commit 4538901cea
2 changed files with 7 additions and 7 deletions

View file

@ -5,7 +5,7 @@ import string
import time import time
from contextlib import contextmanager from contextlib import contextmanager
from copy import deepcopy from copy import deepcopy
from typing import Any, Union from typing import Any
import requests import requests
import socketio import socketio
@ -181,10 +181,10 @@ def _build_maintenance_data(
strategy: MaintenanceStrategy, strategy: MaintenanceStrategy,
active: bool = True, active: bool = True,
description: str = "", description: str = "",
dateRange: list[str] = None, dateRange: list = None,
intervalDay: int = 1, intervalDay: int = 1,
weekdays: list[int] = None, weekdays: list = None,
daysOfMonth: list[Union[int, str]] = None, daysOfMonth: list = None,
timeRange: list = None timeRange: list = None
) -> dict: ) -> dict:
if not dateRange: if not dateRange:

View file

@ -242,9 +242,9 @@ def maintenance_docstring(mode) -> str:
:param MaintenanceStrategy{", optional" if mode == "edit" else ""} strategy: Strategy :param MaintenanceStrategy{", optional" if mode == "edit" else ""} strategy: Strategy
:param bool, optional active: True if maintenance is active, defaults to ``True`` :param bool, optional active: True if maintenance is active, defaults to ``True``
:param str, optional description: Description, defaults to ``""`` :param str, optional description: Description, defaults to ``""``
:param list[str], optional dateRange: DateTime Range, defaults to ``["<current date>"]`` :param list, optional dateRange: DateTime Range, defaults to ``["<current date>"]``
:param int, optional intervalDay: Interval (Run once every day), defaults to ``1`` :param int, optional intervalDay: Interval (Run once every day), defaults to ``1``
:param list[int], optional weekdays: List that contains the days of the week on which the maintenance is enabled (Sun = ``0``, Mon = ``1``, ..., Sat = ``6``). Required for ``strategy`` :attr:`~.MaintenanceStrategy.RECURRING_WEEKDAY`., defaults to ``[]``. :param list, optional weekdays: List that contains the days of the week on which the maintenance is enabled (Sun = ``0``, Mon = ``1``, ..., Sat = ``6``). Required for ``strategy`` :attr:`~.MaintenanceStrategy.RECURRING_WEEKDAY`., defaults to ``[]``.
:param list[Union[int, str]], optional daysOfMonth: List that contains the days of the month on which the maintenance is enabled (Day 1 = ``1``, Day 2 = ``2``, ..., Day 31 = ``31``) and the last day of the month (Last Day of Month = ``"lastDay1"``, 2nd Last Day of Month = ``"lastDay2"``, 3rd Last Day of Month = ``"lastDay3"``, 4th Last Day of Month = ``"lastDay4"``). Required for ``strategy`` :attr:`~.MaintenanceStrategy.RECURRING_DAY_OF_MONTH`., defaults to ``[]``. :param list, optional daysOfMonth: List that contains the days of the month on which the maintenance is enabled (Day 1 = ``1``, Day 2 = ``2``, ..., Day 31 = ``31``) and the last day of the month (Last Day of Month = ``"lastDay1"``, 2nd Last Day of Month = ``"lastDay2"``, 3rd Last Day of Month = ``"lastDay3"``, 4th Last Day of Month = ``"lastDay4"``). Required for ``strategy`` :attr:`~.MaintenanceStrategy.RECURRING_DAY_OF_MONTH`., defaults to ``[]``.
:param list, optional timeRange: Maintenance Time Window of a Day, defaults to ``[{{"hours": 2, "minutes": 0}}, {{"hours": 3, "minutes": 0}}]``. :param list, optional timeRange: Maintenance Time Window of a Day, defaults to ``[{{"hours": 2, "minutes": 0}}, {{"hours": 3, "minutes": 0}}]``.
""" """