Fixed group plugin compatibility with Python < 3.10

This commit is contained in:
squidfunk 2023-10-10 08:44:55 +02:00
parent 1cf9c964f8
commit 4c192d3ab7
No known key found for this signature in database
GPG Key ID: 5ED40BC4F9C436DF
4 changed files with 6 additions and 6 deletions

View File

@ -18,8 +18,6 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
from __future__ import annotations
from mkdocs.config.config_options import Type
from mkdocs.config.base import Config
@ -30,4 +28,4 @@ from mkdocs.config.base import Config
# Group plugin configuration
class GroupConfig(Config):
enabled = Type(bool, default = False)
plugins = Type(list | dict)
plugins = Type((list, dict))

View File

@ -18,6 +18,8 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
from __future__ import annotations
import logging
from collections.abc import Callable

View File

@ -18,8 +18,6 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
from __future__ import annotations
from mkdocs.config.config_options import Type
from mkdocs.config.base import Config
@ -30,4 +28,4 @@ from mkdocs.config.base import Config
# Group plugin configuration
class GroupConfig(Config):
enabled = Type(bool, default = False)
plugins = Type(list | dict)
plugins = Type((list, dict))

View File

@ -18,6 +18,8 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
from __future__ import annotations
import logging
from collections.abc import Callable