You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Are there any plans to enable typing support for the qiskit-terra project (or, more broadly, qiskit as a whole) in line with https://peps.python.org/pep-0561/?
At the moment, a package that uses qiskit and corresponding type annotations will trip up type checkers such as mypy, with a warning of the sort
error: Skipping analyzing "qiskit": module is installed, but missing library stubs or py.typed marker [import]
from qiskit import QuantumCircuit
As a result, packages building on top of qiskit cannot be type checked properly/completely.
According to PEP 561, the solution could be as easy as adding a py.typed marker (file) to the package directory.
The text was updated successfully, but these errors were encountered:
To get the all the benefits of type annotation (e.g. auto complete, mypy checking), I think one should also need to add type annotation for python API. I can see manyl .py files that are not type annotated
The outcome was that the team is generally in favor of PRs adding or improving type annotations, especially where they help to clarify existing code structure. For now, there are no plans to make these mandatory for new changes or say as part of a CI check, at least until our annotations and tooling are in a place where they wouldn't be a barrier to new contributors.
What should we add?
Are there any plans to enable typing support for the
qiskit-terra
project (or, more broadly,qiskit
as a whole) in line with https://peps.python.org/pep-0561/?At the moment, a package that uses qiskit and corresponding type annotations will trip up type checkers such as mypy, with a warning of the sort
As a result, packages building on top of qiskit cannot be type checked properly/completely.
According to PEP 561, the solution could be as easy as adding a
py.typed
marker (file) to the package directory.The text was updated successfully, but these errors were encountered: