Skip to content
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

tools/find_deprecated.py for finding deprecation decorators (and remember to remove them :) ) #10178

Merged
merged 23 commits into from
Sep 27, 2023

Conversation

1ucian0
Copy link
Member

@1ucian0 1ucian0 commented May 29, 2023

The great work that @Eric-Arellano did annotating all the deprecations with deprecate_func and deprecate_arg allows to quickly find deprecations that needs removal.

This PR adds tools/find_deprecated.py. This utility finds the deprecation decorators and groups them by since parameter. It also checks how many days had passed since the last minor release.

At this point, the current result of running this utility is this:


0.15: Released in August 06, 2020 (1001 days until last minor release)
 - /<redacted>/qiskit/visualization/state_visualization.py:38
 - /<redacted>/qiskit/visualization/state_visualization.py:256
 - /<redacted>/qiskit/visualization/state_visualization.py:364
 - /<redacted>/qiskit/visualization/state_visualization.py:621
 - /<redacted>/qiskit/visualization/state_visualization.py:792

0.16: Released in October 15, 2020 (930 days until last minor release)
 - /<redacted>/qiskit/circuit/library/arithmetic/polynomial_pauli_rotations.py:228

0.17: Released in April 01, 2021 (763 days until last minor release)
 - /<redacted>/qiskit/test/decorators.py:144
 - /<redacted>/qiskit/circuit/bit.py:62
 - /<redacted>/qiskit/circuit/bit.py:84

0.18: Released in July 12, 2021 (660 days until last minor release)
 - /<redacted>/qiskit/algorithms/phase_estimators/phase_estimation_result.py:70
 - /<redacted>/qiskit/opflow/gradients/derivative_base.py:138

0.19: Released in December 06, 2021 (513 days until last minor release)
 - /<redacted>/qiskit/transpiler/instruction_durations.py:173
 - /<redacted>/qiskit/circuit/instructionset.py:98
 - /<redacted>/qiskit/providers/models/backendconfiguration.py:834
 - /<redacted>/qiskit/algorithms/optimizers/adam_amsgrad.py:198
 - /<redacted>/qiskit/algorithms/optimizers/adam_amsgrad.py:199
 - /<redacted>/qiskit/algorithms/optimizers/adam_amsgrad.py:200
 - /<redacted>/qiskit/qobj/__init__.py:84

0.20: Released in March 31, 2022 (398 days until last minor release)
 - /<redacted>/qiskit/visualization/circuit/latex.py:51
 - /<redacted>/qiskit/visualization/circuit/latex.py:52
 - /<redacted>/qiskit/visualization/circuit/latex.py:53
 - /<redacted>/qiskit/visualization/circuit/latex.py:54
 - /<redacted>/qiskit/transpiler/coupling.py:128
 - /<redacted>/qiskit/dagcircuit/dagcircuit.py:529
 - /<redacted>/qiskit/synthesis/evolution/suzuki_trotter.py:54

0.21: Released in June 30, 2022 (308 days until last minor release)
 - /<redacted>/qiskit/execute_function.py:39
 - /<redacted>/qiskit/execute_function.py:40
 - /<redacted>/qiskit/transpiler/passes/scheduling/alap.py:30
 - /<redacted>/qiskit/transpiler/passes/scheduling/asap.py:36
 - /<redacted>/qiskit/transpiler/passes/scheduling/dynamical_decoupling.py:93
 - /<redacted>/qiskit/transpiler/passes/scheduling/alignments/align_measures.py:93
 - /<redacted>/qiskit/transpiler/passes/utils/cx_direction.py:22
 - /<redacted>/qiskit/transpiler/passes/utils/check_cx_direction.py:22
 - /<redacted>/qiskit/algorithms/optimizers/spsa.py:652
 - /<redacted>/qiskit/pulse/transforms/alignments.py:48
 - /<redacted>/qiskit/pulse/transforms/alignments.py:333
 - /<redacted>/qiskit/pulse/transforms/alignments.py:417
 - /<redacted>/qiskit/qpy/interface.py:75

0.22: Released in October 13, 2022 (202 days until last minor release)
 - /<redacted>/qiskit/visualization/counts_visualization.py:60
 - /<redacted>/qiskit/visualization/circuit/_utils.py:199
 - /<redacted>/qiskit/visualization/circuit/_utils.py:287
 - /<redacted>/qiskit/transpiler/passes/calibration/rzx_builder.py:68
 - /<redacted>/qiskit/providers/basicaer/qasm_simulator.py:375
 - /<redacted>/qiskit/pulse/utils.py:113
 - /<redacted>/qiskit/pulse/library/parametric_pulses.py:66
 - /<redacted>/qiskit/pulse/library/parametric_pulses.py:135
 - /<redacted>/qiskit/pulse/library/parametric_pulses.py:247
 - /<redacted>/qiskit/pulse/library/parametric_pulses.py:417
 - /<redacted>/qiskit/pulse/library/parametric_pulses.py:540
 - /<redacted>/qiskit/quantum_info/operators/symplectic/pauli_utils.py:20
 - /<redacted>/qiskit/quantum_info/operators/symplectic/random.py:106

0.23: Released in January 26, 2023 (97 days until last minor release)
 - /<redacted>/qiskit/visualization/state_visualization.py:1294
 - /<redacted>/qiskit/visualization/state_visualization.py:1313
 - /<redacted>/qiskit/visualization/pulse/matplotlib.py:55
 - /<redacted>/qiskit/visualization/pulse/matplotlib.py:292
 - /<redacted>/qiskit/visualization/pulse/matplotlib.py:395
 - /<redacted>/qiskit/visualization/pulse/interpolation.py:28
 - /<redacted>/qiskit/visualization/pulse/interpolation.py:68
 - /<redacted>/qiskit/visualization/pulse/qcstyle.py:32
 - /<redacted>/qiskit/visualization/pulse/qcstyle.py:177
 - /<redacted>/qiskit/transpiler/target.py:244
 - /<redacted>/qiskit/transpiler/passes/synthesis/linear_functions_synthesis.py:30
 - /<redacted>/qiskit/circuit/classicalregister.py:60
 - /<redacted>/qiskit/circuit/quantumregister.py:61
 - /<redacted>/qiskit/pulse/instructions/instruction.py:226
 - /<redacted>/qiskit/pulse/library/symbolic_pulses.py:590
 - /<redacted>/qiskit/qobj/converters/pulse_instruction.py:505
 - /<redacted>/qiskit/qobj/converters/pulse_instruction.py:512
 - /<redacted>/qiskit/qobj/converters/pulse_instruction.py:519
 - /<redacted>/qiskit/qobj/converters/pulse_instruction.py:526
 - /<redacted>/qiskit/qobj/converters/pulse_instruction.py:533
 - /<redacted>/qiskit/qobj/converters/pulse_instruction.py:540
 - /<redacted>/qiskit/qobj/converters/pulse_instruction.py:547
 - /<redacted>/qiskit/qobj/converters/pulse_instruction.py:554
 - /<redacted>/qiskit/qobj/converters/pulse_instruction.py:561
 - /<redacted>/qiskit/qobj/converters/pulse_instruction.py:958
 - /<redacted>/qiskit/qobj/converters/pulse_instruction.py:969
 - /<redacted>/qiskit/qobj/converters/pulse_instruction.py:980
 - /<redacted>/qiskit/qobj/converters/pulse_instruction.py:991
 - /<redacted>/qiskit/qobj/converters/pulse_instruction.py:1002
 - /<redacted>/qiskit/qobj/converters/pulse_instruction.py:1013
 - /<redacted>/qiskit/qobj/converters/pulse_instruction.py:1024
 - /<redacted>/qiskit/qobj/converters/pulse_instruction.py:1032
 - /<redacted>/qiskit/qobj/converters/pulse_instruction.py:1043
 - /<redacted>/qiskit/quantum_info/synthesis/two_qubit_decompose.py:1088
 - /<redacted>/qiskit/quantum_info/synthesis/clifford_decompose.py:24
 - /<redacted>/qiskit/quantum_info/synthesis/cnotdihedral_decompose.py:23

0.24: Released in May 04, 2023 (0 days until last minor release)
 - /<redacted>/qiskit/transpiler/target.py:1133
 - /<redacted>/qiskit/transpiler/target.py:1143
 - /<redacted>/qiskit/transpiler/passes/routing/bip_mapping.py:68
 - /<redacted>/qiskit/transpiler/passes/routing/algorithms/bip_model.py:45
 - /<redacted>/qiskit/algorithms/aux_ops_evaluator.py:34
 - /<redacted>/qiskit/algorithms/minimum_eigensolvers/adapt_vqe.py:100
 - /<redacted>/qiskit/algorithms/minimum_eigensolvers/adapt_vqe.py:144
 - /<redacted>/qiskit/algorithms/minimum_eigensolvers/adapt_vqe.py:159
 - /<redacted>/qiskit/algorithms/optimizers/qnspsa.py:258
 - /<redacted>/qiskit/algorithms/optimizers/qnspsa.py:266
 - /<redacted>/qiskit/algorithms/evolvers/real_evolver.py:32
 - /<redacted>/qiskit/algorithms/evolvers/evolution_problem.py:36
 - /<redacted>/qiskit/algorithms/evolvers/evolution_result.py:34
 - /<redacted>/qiskit/algorithms/evolvers/imaginary_evolver.py:32
 - /<redacted>/qiskit/algorithms/evolvers/trotterization/trotter_qrte.py:68
 - /<redacted>/qiskit/algorithms/phase_estimators/hamiltonian_phase_estimation.py:96
 - /<redacted>/qiskit/algorithms/phase_estimators/ipe.py:42
 - /<redacted>/qiskit/algorithms/phase_estimators/phase_estimation.py:84
 - /<redacted>/qiskit/algorithms/amplitude_amplifiers/grover.py:117
 - /<redacted>/qiskit/algorithms/amplitude_amplifiers/grover.py:199
 - /<redacted>/qiskit/algorithms/amplitude_amplifiers/grover.py:213
 - /<redacted>/qiskit/algorithms/eigen_solvers/numpy_eigen_solver.py:51
 - /<redacted>/qiskit/algorithms/eigen_solvers/eigen_solver.py:38
 - /<redacted>/qiskit/algorithms/eigen_solvers/eigen_solver.py:90
 - /<redacted>/qiskit/algorithms/eigen_solvers/vqd.py:100
 - /<redacted>/qiskit/algorithms/eigen_solvers/vqd.py:774
 - /<redacted>/qiskit/algorithms/amplitude_estimators/fae.py:51
 - /<redacted>/qiskit/algorithms/amplitude_estimators/fae.py:113
 - /<redacted>/qiskit/algorithms/amplitude_estimators/fae.py:127
 - /<redacted>/qiskit/algorithms/amplitude_estimators/mlae.py:56
 - /<redacted>/qiskit/algorithms/amplitude_estimators/mlae.py:140
 - /<redacted>/qiskit/algorithms/amplitude_estimators/mlae.py:154
 - /<redacted>/qiskit/algorithms/amplitude_estimators/iae.py:53
 - /<redacted>/qiskit/algorithms/amplitude_estimators/iae.py:136
 - /<redacted>/qiskit/algorithms/amplitude_estimators/iae.py:150
 - /<redacted>/qiskit/algorithms/amplitude_estimators/ae.py:67
 - /<redacted>/qiskit/algorithms/amplitude_estimators/ae.py:135
 - /<redacted>/qiskit/algorithms/amplitude_estimators/ae.py:149
 - /<redacted>/qiskit/algorithms/minimum_eigen_solvers/numpy_minimum_eigen_solver.py:42
 - /<redacted>/qiskit/algorithms/minimum_eigen_solvers/minimum_eigen_solver.py:39
 - /<redacted>/qiskit/algorithms/minimum_eigen_solvers/minimum_eigen_solver.py:96
 - /<redacted>/qiskit/algorithms/minimum_eigen_solvers/vqe.py:130
 - /<redacted>/qiskit/algorithms/minimum_eigen_solvers/vqe.py:671
 - /<redacted>/qiskit/algorithms/minimum_eigen_solvers/qaoa.py:64
 - /<redacted>/qiskit/utils/quantum_instance.py:147
 - /<redacted>/qiskit/utils/run_circuits.py:43
 - /<redacted>/qiskit/utils/run_circuits.py:108
 - /<redacted>/qiskit/utils/measurement_error_mitigation.py:33
 - /<redacted>/qiskit/utils/measurement_error_mitigation.py:81
 - /<redacted>/qiskit/utils/measurement_error_mitigation.py:126
 - /<redacted>/qiskit/utils/measurement_error_mitigation.py:205
 - /<redacted>/qiskit/utils/backend_utils.py:53
 - /<redacted>/qiskit/utils/backend_utils.py:74
 - /<redacted>/qiskit/utils/backend_utils.py:94
 - /<redacted>/qiskit/utils/backend_utils.py:118
 - /<redacted>/qiskit/utils/backend_utils.py:135
 - /<redacted>/qiskit/utils/backend_utils.py:155
 - /<redacted>/qiskit/utils/backend_utils.py:171
 - /<redacted>/qiskit/utils/backend_utils.py:200
 - /<redacted>/qiskit/utils/backend_utils.py:219
 - /<redacted>/qiskit/utils/backend_utils.py:238
 - /<redacted>/qiskit/utils/backend_utils.py:258
 - /<redacted>/qiskit/utils/mitigation/circuits.py:25
 - /<redacted>/qiskit/utils/mitigation/circuits.py:43
 - /<redacted>/qiskit/utils/mitigation/circuits.py:124
 - /<redacted>/qiskit/utils/mitigation/_filters.py:46
 - /<redacted>/qiskit/utils/mitigation/_filters.py:228
 - /<redacted>/qiskit/utils/mitigation/fitters.py:38
 - /<redacted>/qiskit/utils/mitigation/fitters.py:222
 - /<redacted>/qiskit/opflow/utils.py:19
 - /<redacted>/qiskit/opflow/utils.py:40
 - /<redacted>/qiskit/opflow/utils.py:61
 - /<redacted>/qiskit/opflow/exceptions.py:22
 - /<redacted>/qiskit/opflow/operator_globals.py:36
 - /<redacted>/qiskit/opflow/operator_base.py:48
 - /<redacted>/qiskit/opflow/primitive_ops/matrix_op.py:39
 - /<redacted>/qiskit/opflow/primitive_ops/pauli_sum_op.py:37
 - /<redacted>/qiskit/opflow/primitive_ops/primitive_op.py:96
 - /<redacted>/qiskit/opflow/primitive_ops/pauli_op.py:38
 - /<redacted>/qiskit/opflow/primitive_ops/circuit_op.py:34
 - /<redacted>/qiskit/opflow/primitive_ops/tapered_pauli_sum_op.py:38
 - /<redacted>/qiskit/opflow/primitive_ops/tapered_pauli_sum_op.py:91
 - /<redacted>/qiskit/opflow/mixins/tensor.py:31
 - /<redacted>/qiskit/opflow/mixins/star_algebra.py:43
 - /<redacted>/qiskit/opflow/list_ops/summed_op.py:34
 - /<redacted>/qiskit/opflow/list_ops/list_op.py:56
 - /<redacted>/qiskit/opflow/list_ops/tensored_op.py:35
 - /<redacted>/qiskit/opflow/list_ops/composed_op.py:37
 - /<redacted>/qiskit/opflow/state_fns/operator_state_fn.py:40
 - /<redacted>/qiskit/opflow/state_fns/cvar_measurement.py:44
 - /<redacted>/qiskit/opflow/state_fns/sparse_vector_state_fn.py:41
 - /<redacted>/qiskit/opflow/state_fns/dict_state_fn.py:41
 - /<redacted>/qiskit/opflow/state_fns/vector_state_fn.py:40
 - /<redacted>/qiskit/opflow/state_fns/circuit_state_fn.py:47
 - /<redacted>/qiskit/opflow/state_fns/state_fn.py:116
 - /<redacted>/qiskit/opflow/converters/circuit_sampler.py:55
 - /<redacted>/qiskit/opflow/converters/two_qubit_reduction.py:39
 - /<redacted>/qiskit/opflow/converters/converter_base.py:33
 - /<redacted>/qiskit/opflow/converters/abelian_grouper.py:45
 - /<redacted>/qiskit/opflow/converters/dict_to_circuit_sum.py:32
 - /<redacted>/qiskit/opflow/converters/pauli_basis_change.py:59
 - /<redacted>/qiskit/opflow/expectations/matrix_expectation.py:28
 - /<redacted>/qiskit/opflow/expectations/aer_pauli_expectation.py:42
 - /<redacted>/qiskit/opflow/expectations/cvar_expectation.py:58
 - /<redacted>/qiskit/opflow/expectations/expectation_factory.py:39
 - /<redacted>/qiskit/opflow/expectations/expectation_base.py:41
 - /<redacted>/qiskit/opflow/expectations/pauli_expectation.py:45
 - /<redacted>/qiskit/opflow/evolutions/matrix_evolution.py:34
 - /<redacted>/qiskit/opflow/evolutions/pauli_trotter_evolution.py:54
 - /<redacted>/qiskit/opflow/evolutions/evolution_factory.py:28
 - /<redacted>/qiskit/opflow/evolutions/evolved_op.py:43
 - /<redacted>/qiskit/opflow/evolutions/evolution_base.py:33
 - /<redacted>/qiskit/opflow/evolutions/trotterizations/trotter.py:25
 - /<redacted>/qiskit/opflow/evolutions/trotterizations/trotterization_base.py:29
 - /<redacted>/qiskit/opflow/evolutions/trotterizations/suzuki.py:38
 - /<redacted>/qiskit/opflow/evolutions/trotterizations/trotterization_factory.py:26
 - /<redacted>/qiskit/opflow/evolutions/trotterizations/qdrift.py:40
 - /<redacted>/qiskit/opflow/gradients/qfi.py:40
 - /<redacted>/qiskit/opflow/gradients/qfi_base.py:33
 - /<redacted>/qiskit/opflow/gradients/gradient.py:40
 - /<redacted>/qiskit/opflow/gradients/hessian.py:43
 - /<redacted>/qiskit/opflow/gradients/derivative_base.py:50
 - /<redacted>/qiskit/opflow/gradients/natural_gradient.py:55
 - /<redacted>/qiskit/opflow/gradients/hessian_base.py:25
 - /<redacted>/qiskit/opflow/gradients/gradient_base.py:28
 - /<redacted>/qiskit/opflow/gradients/circuit_gradients/circuit_gradient.py:39
 - /<redacted>/qiskit/opflow/gradients/circuit_gradients/lin_comb.py:104
 - /<redacted>/qiskit/opflow/gradients/circuit_gradients/param_shift.py:50
 - /<redacted>/qiskit/opflow/gradients/circuit_qfis/circuit_qfi.py:39
 - /<redacted>/qiskit/opflow/gradients/circuit_qfis/overlap_block_diag.py:42
 - /<redacted>/qiskit/opflow/gradients/circuit_qfis/overlap_diag.py:41
 - /<redacted>/qiskit/opflow/gradients/circuit_qfis/lin_comb_full.py:39
 - /<redacted>/qiskit/quantum_info/operators/symplectic/stabilizer_table.py:172
 - /<redacted>/qiskit/quantum_info/operators/symplectic/clifford.py:218
 - /<redacted>/qiskit/quantum_info/operators/symplectic/clifford.py:226
 - /<redacted>/qiskit/quantum_info/operators/symplectic/clifford.py:232
 - /<redacted>/qiskit/quantum_info/operators/symplectic/clifford.py:242
 - /<redacted>/qiskit/quantum_info/operators/symplectic/clifford.py:258
 - /<redacted>/qiskit/quantum_info/operators/symplectic/clifford.py:270
 - /<redacted>/qiskit/quantum_info/operators/symplectic/clifford.py:282
 - /<redacted>/qiskit/quantum_info/operators/symplectic/clifford.py:294
 - /<redacted>/qiskit/quantum_info/operators/symplectic/pauli_table.py:130

0.25: Future release
 - /<redacted>/qiskit/transpiler/preset_passmanagers/common.py:550
 - /<redacted>/qiskit/tools/jupyter/library.py:53
 - /<redacted>/qiskit/tools/jupyter/library.py:122
 - /<redacted>/qiskit/tools/jupyter/library.py:142
 - /<redacted>/qiskit/tools/jupyter/library.py:206
 - /<redacted>/qiskit/tools/jupyter/library.py:232
 - /<redacted>/qiskit/tools/jupyter/jupyter_magics.py:178

@1ucian0 1ucian0 requested a review from a team as a code owner May 29, 2023 20:21
@qiskit-bot
Copy link
Collaborator

One or more of the the following people are requested to review this:

  • @Qiskit/terra-core

Copy link
Collaborator

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

self._since = None

@property
def type(self):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's typically better to avoid type in Python because type() is a builtin and Python is permissive with letting you shadow the name, which can cause issues.

I usually go with kind instead as a synonym.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! removing the method in 0be2969, since I mostly used for debugging while writing.

import requests


class Deprecation:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding type hints to this file. While it's indeed only a tool, I encourage treating build-support code as first-class.

Even though we're not using MyPy, type hints will still help with making this code more self-documenting. And it will save future us time if/when we add MyPy.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with the help of @mrossinek , type hints in 56904d5 !

Comment on lines 137 to 138
with open(file_name, encoding="utf-8") as fp:
code = fp.read()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI Path(file_name).read_text() is more concise.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point. Done in 1ecc5af (with you as co-author)


if __name__ == "__main__":
collection = DeprecationCollection(Path(__file__).joinpath("..", "..", "qiskit").resolve())
# collection.collect_deprecations()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dead code?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeap! removed in 033ea64

tools/find_deprecated.py Show resolved Hide resolved
DATA_JSON["releases"][f"{LAST_MINOR}.0"][0]["upload_time"]
)
except requests.exceptions.ConnectionError:
print("https://pypi.org/pypi/qiskit-terra/json timeout...")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why continue with the script? The code will be more clear if you early exit with sys.exit(1). Also technically, you should print(..., file=sys.stderr).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because no internet connect is required. It is more like an optional (I sometimes remove all deprecation on airplanes, for example)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

file=sys.stderr added in 315643e

@coveralls
Copy link

coveralls commented Jun 10, 2023

Pull Request Test Coverage Report for Build 5766314603

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 67 unchanged lines in 4 files lost coverage.
  • Overall coverage increased (+1.3%) to 87.233%

Files with Coverage Reduction New Missed Lines %
qiskit/visualization/circuit/_utils.py 1 93.79%
crates/qasm2/src/lex.rs 5 91.14%
crates/qasm2/src/parse.rs 6 96.2%
qiskit/visualization/bloch.py 55 49.65%
Totals Coverage Status
Change from base Build 5765351446: 1.3%
Covered Lines: 74234
Relevant Lines: 85099

💛 - Coveralls

Copy link
Collaborator

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Luciano!

return original_path


class Deprecation:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this only has one subclass, DeprecationCall? You can simplify this by merging the two. No need to overly generalize.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DeprecationDecorator is also a subclass. It helped me to code it.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 6325542459

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 17 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.008%) to 87.008%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 2 91.41%
qiskit/pulse/library/waveform.py 3 93.75%
crates/qasm2/src/parse.rs 12 97.13%
Totals Coverage Status
Change from base Build 6301697315: -0.008%
Covered Lines: 74053
Relevant Lines: 85111

💛 - Coveralls

@kdk kdk added this pull request to the merge queue Sep 27, 2023
Merged via the queue into Qiskit:main with commit 18a9a2b Sep 27, 2023
13 checks passed
@1ucian0 1ucian0 added the Changelog: None Do not include in changelog label Sep 28, 2023
rupeshknn pushed a commit to rupeshknn/qiskit that referenced this pull request Oct 9, 2023
…mber to remove them :) ) (Qiskit#10178)

* tools/find_deprecated.py

* spelling

* ast import

* remove meth:type

* type hints

Co-authored-by: Max Rossmannek <[email protected]>

* sys.stderr

* remove old comment

* Path(file_name).read_text()

Co-authored-by: Eric Arellano <[email protected]>

* smaller try block

* bullet lists

* no identation

* double the

* cast

* calling instead of decorations

* in months

---------

Co-authored-by: Max Rossmannek <[email protected]>
Co-authored-by: Eric Arellano <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: None Do not include in changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants