Skip to content

Type annotation error with Python 3.8 #9

@AnesBenmerzoug

Description

@AnesBenmerzoug

With the recent release of version 0.8.0 of mkdocs-alias, we started having errors when building our documentation using Python 3.8 (See these CI logs).

It seems that the package's code started using list for annotating lists of objects instead of using List from the typing package and that is not supported in Python 3.8.

There are 2 possible solutions:

  • Add from __future__ import annotations at the top of the plugin module.
  • Use List from the typing package instead of list until Python 3.8 is no longer supported.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions