-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add warning for bad justify input in circuit_drawer * change justify after raising error * typo indentation + improving warning string * Undo max_lenght limit by autoformater (120 > 105) * Make lines fullfill 105 max lenght requirement * Solve regex matching parenthesis problem and don't trigger the wanring for default value * Change justify default value to "left", & add deprecation wrapper * Change and extend warnings tests * Solve various layers of same argument DeprecationWarning * Added a clarification comment for the solution, about multiple deprecationwarnings * Ignore cyclic import error, as above * Apply suggestions from code review Co-authored-by: Eric Arellano <[email protected]> * Apply suggestions from code review * Improve DeprecationWarning readability, and fix warning checks tests * Remove `_is_valid_justify_arg` from `@deprecate_arg`, for solving circular import * in `deprecate_arg` change `since` to "1.2.0" * black formater suggestion * negate conditions for `predicate` in `@deprecate_arg` * remove `pending=True`, since then warning is not raised * change qiskit version on tests * remove assert Regex for DeprecationWarning * Add release note, and remove two undesired changes in imports * changing release note naming from "_" to "-" * Add extra line in the end, for lint * Redid release file from start, with shorter name, and correct spacings * Remove final spaces in all lines... * Try without deprecations_visualization section.. * Solve, bad Sphinx spacing, go back to deprecations_visualization * Go back to `None` as default value * Simplifying deprecation logic * Remove unused imports and changed missing default value * Improve docstring for public methods * Improve error readbility and testing of it with regex --------- Co-authored-by: Eric Arellano <[email protected]>
- Loading branch information
1 parent
67fd35a
commit ed87f2f
Showing
5 changed files
with
84 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
releasenotes/notes/circuit-draw-warn-justify-03434d30cccda452.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
deprecations_visualization: | ||
- | | ||
The ``justify`` argument of :func:`circuit_drawer` or :meth:`QuantumCircuit.draw`, will | ||
no longer support invalid values (previously changing them to the default), and in a future | ||
release they will error. Valid justify values are ``"left"``, ``"right"`` or ``"none"``. | ||
fixes: | ||
- | | ||
Fixed an issue where :func:`circuit_drawer` or the :meth:`QuantumCircuit.draw` method would | ||
not raise a warning when an invalid value was passed to the ``justify`` argument, before | ||
changing it to the default. Now, it will raise a warning if an invalid value is passed. | ||
Valid justify values are ``"left"``, ``"right"`` or ``"none"``. Refer to | ||
`#12089 <https://github.com/Qiskit/qiskit/issues/12089>` for more details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters