Skip to content

Type hints in 0.13.0 incompatible with Python 3.7 #893

@mtreinish

Description

@mtreinish

Information

  • rustworkx version: 0.13.0
  • Python version: 3.7
  • Rust version: N/A
  • Operating system: Linux

What is the current behavior?

Running mypy with Python 3.7 in a package that uses rustworkx fails trying to parse the stubs files. For example:

/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/rustworkx/graph.pyi:34: error: invalid syntax  [syntax]

See: https://github.com/qiskit-community/qiskit-nature-pyscf/actions/runs/5200238443/jobs/9378913497?pr=35#step:7:15 for where this happened in CI.

What is the expected behavior?

The type hint syntax used is compatible with the rustworkx python version

Steps to reproduce the problem

Run mypy using rustworkx on python 3.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions