Skip to content

TypeError: Plain typing.NoReturn is not valid as type argument in Astroid 2.8.5 + Python 3.7.0/1 #1239

@drasmuss

Description

@drasmuss

Steps to reproduce

  1. Use Python 3.7.0 or 3.7.1
  2. pip install astroid==2.8.5
  3. python -c "import astroid"

Current behavior

An error is raised

TypeError: Plain typing.NoReturn is not valid as type argument

In this commit b62f243#diff-039e09546480e9ce70fc9a23e975f1ac2364f6d0192e330311d204653947a216R34 there is a conditional import that checks if Python >= 3.6.2, but that should also include Python 3.7.0 and 3.7.1 (which have the same issue as Python 3.6.0/1).

Expected behavior

There should be no error

python -c "from astroid import pkginfo; print(pkginfo.version)" output

This raises the same error as above

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions