Commit f76c3c6
committed
fix: replace mutable default arguments with None in CNV plot functions
Fixes #787
plot_cnv_hmm_heatmap, plot_cnv_hmm_heatmap_track, and the CNV colorscale
in plot_diplotype_clustering_advanced were using a mutable list
(cnv_params.colorscale_default) as a default parameter value, which is
a dangerous pattern in Python. Replaced with None and added fallback
assignment at the start of each function body.1 parent bef737a commit f76c3c6
2 files changed
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
886 | 886 | | |
887 | 887 | | |
888 | 888 | | |
889 | | - | |
| 889 | + | |
890 | 890 | | |
891 | 891 | | |
892 | 892 | | |
893 | 893 | | |
| 894 | + | |
| 895 | + | |
894 | 896 | | |
895 | 897 | | |
896 | 898 | | |
| |||
1028 | 1030 | | |
1029 | 1031 | | |
1030 | 1032 | | |
1031 | | - | |
| 1033 | + | |
1032 | 1034 | | |
1033 | 1035 | | |
1034 | 1036 | | |
1035 | 1037 | | |
1036 | 1038 | | |
1037 | 1039 | | |
| 1040 | + | |
| 1041 | + | |
1038 | 1042 | | |
1039 | 1043 | | |
1040 | 1044 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
622 | 622 | | |
623 | 623 | | |
624 | 624 | | |
625 | | - | |
| 625 | + | |
626 | 626 | | |
627 | 627 | | |
628 | 628 | | |
| |||
657 | 657 | | |
658 | 658 | | |
659 | 659 | | |
| 660 | + | |
| 661 | + | |
660 | 662 | | |
661 | 663 | | |
662 | 664 | | |
| |||
0 commit comments