@@ -584,44 +584,50 @@ def _type_repr_in_deprecated_module():
584584
585585# this is where the deprecation error should show where the deprecated usage
586586# has occured, which is this file
587- _deprecation_origin = [ '_compat_test.py:' ]
587+ _deprecation_origin = '_compat_test.py:'
588588
589589# see cirq_compat_test_data/__init__.py for the setup code
590590_fake_a_deprecation_msg = [
591591 f'{ old_parent } .fake_a was used but is deprecated' ,
592592 f'Use { old_parent } .module_a instead' ,
593- ] + _deprecation_origin
593+ _deprecation_origin ,
594+ ]
594595
595596# see cirq_compat_test_data/__init__.py for the setup code
596597_fake_b_deprecation_msg = [
597598 f'{ old_parent } .fake_b was used but is deprecated' ,
598599 f'Use { old_parent } .module_a.module_b instead' ,
599- ] + _deprecation_origin
600+ _deprecation_origin ,
601+ ]
600602
601603# see cirq_compat_test_data/__init__.py for the setup code
602604_fake_ab_deprecation_msg = [
603605 f'{ old_parent } .module_a.fake_ab was used but is deprecated' ,
604606 f'Use { old_parent } .module_a.module_b instead' ,
605- ] + _deprecation_origin
607+ _deprecation_origin ,
608+ ]
606609
607610# see cirq_compat_test_data/__init__.py for the setup code
608611_fake_ops_deprecation_msg = [
609612 f'{ old_parent } .fake_ops was used but is deprecated' ,
610613 'Use cirq.ops instead' ,
611- ] + _deprecation_origin
614+ _deprecation_origin ,
615+ ]
612616
613617
614618# see cirq_compat_test_data/__init__.py for the setup code
615619_fake_numpy_deprecation_msg = [
616620 f'{ old_parent } .fake_numpy was used but is deprecated' ,
617621 'Use numpy instead' ,
618- ] + _deprecation_origin
622+ _deprecation_origin ,
623+ ]
619624
620625# see cirq_compat_test_data/__init__.py for the setup code
621626_repeated_child_deprecation_msg = [
622627 f'{ old_parent } .repeated_child was used but is deprecated' ,
623628 f'Use { old_parent } .repeated instead' ,
624- ] + _deprecation_origin
629+ _deprecation_origin ,
630+ ]
625631
626632
627633def _trace_unhandled_exceptions (* args , queue : multiprocessing .Queue , func : Callable ):
0 commit comments