1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-30 18:24:35 +01:00

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 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE. # IN THE SOFTWARE.
from __future__ import annotations
from mkdocs.config.config_options import Type from mkdocs.config.config_options import Type
from mkdocs.config.base import Config from mkdocs.config.base import Config
@ -30,4 +28,4 @@ from mkdocs.config.base import Config
# Group plugin configuration # Group plugin configuration
class GroupConfig(Config): class GroupConfig(Config):
enabled = Type(bool, default = False) 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 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE. # IN THE SOFTWARE.
from __future__ import annotations
import logging import logging
from collections.abc import Callable 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 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE. # IN THE SOFTWARE.
from __future__ import annotations
from mkdocs.config.config_options import Type from mkdocs.config.config_options import Type
from mkdocs.config.base import Config from mkdocs.config.base import Config
@ -30,4 +28,4 @@ from mkdocs.config.base import Config
# Group plugin configuration # Group plugin configuration
class GroupConfig(Config): class GroupConfig(Config):
enabled = Type(bool, default = False) 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 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE. # IN THE SOFTWARE.
from __future__ import annotations
import logging import logging
from collections.abc import Callable from collections.abc import Callable