Skip to content

Commit

Permalink
Fixed group plugin compatibility with Python < 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
squidfunk committed Oct 10, 2023
1 parent 1cf9c96 commit 4c192d3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 1 addition & 3 deletions material/plugins/group/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -30,4 +28,4 @@
# Group plugin configuration
class GroupConfig(Config):
enabled = Type(bool, default = False)
plugins = Type(list | dict)
plugins = Type((list, dict))
2 changes: 2 additions & 0 deletions material/plugins/group/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions src/plugins/group/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -30,4 +28,4 @@
# Group plugin configuration
class GroupConfig(Config):
enabled = Type(bool, default = False)
plugins = Type(list | dict)
plugins = Type((list, dict))
2 changes: 2 additions & 0 deletions src/plugins/group/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4c192d3

Please sign in to comment.