-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression in EquivalenceLibrary documentation from oxidation #13258
Comments
Yeah we should definitely fix this, the simple first step is to just add back the deleted docstrings from the python version to the pyo3 struct and methods. However, the type hints are a bit more involved since there isn't a C api method of returning type hints from python. The best we can do is add a stub file like suggested in #12803 although it'd be incomplete to start as adding a complete one is a much larger undertaking (it's something we did in rustworkx and took the better part of a year given the api surface). I guess the easier first step would be to add them to the docstring so the info isn't lost even if means a regression from the mypy perspective. |
That's fine to be incomplete to start. I'd encourage taking that incremental approach. Type hints are helpful to developers in day-to-day because of the close IDE integrations, so it'd be a bummer to lose type information. One benefit of adding the stub file—even if it's quite barren—is it makes it easier for all new oxidation to do the right thing. You can stop the problem from getting even bigger. |
Fwiw, the original Python didn't have type hints either. What you can see is just part of the docstring. |
Generated with `npx tsx scripts/js/commands/api/syncDevDocs.ts` (cron job currently not working). Note that Runtime removes all v1 Fake Provider pages. We'll set up redirects once this version becomes stable. There is also a Qiskit SDK regression tracked by Qiskit/qiskit#13258.
When generating the 1.3 dev docs, I noticed this diff:
diff
Losing the GitHub source code link doesn't seem very feasible to fix because we populate it based on
inspect.getsourcefile
. Imo it's not that big of a deal because the class still has the link, and it might confuse users to point them to Rust code.The bigger concern is the type hints, parameters, and description.
The text was updated successfully, but these errors were encountered: