Commit 2f37b1d
committed
Converted a few class variables into instance variables
Now that users can nest instances of cmd.Cmd2 to support creating sub-menus, we should need to be more careful about class vs instance variables to prevent potential problems.
This converts the following former class variables into instance variables:
- multiline_commands
- shortcuts
- exclude_from_help
- exclude_from_history
In the process, a couple camelCase variable names got converted to pep8_compliant names.
There may be a few other class variables which should be converted to instance variables. But at the very least, this is a good start.
This closes #273.1 parent 656a774 commit 2f37b1d
2 files changed
Lines changed: 29 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
788 | 788 | | |
789 | 789 | | |
790 | 790 | | |
791 | | - | |
792 | 791 | | |
793 | 792 | | |
794 | | - | |
795 | 793 | | |
796 | 794 | | |
797 | 795 | | |
798 | 796 | | |
799 | 797 | | |
800 | 798 | | |
801 | | - | |
802 | | - | |
803 | 799 | | |
804 | 800 | | |
805 | 801 | | |
| |||
869 | 865 | | |
870 | 866 | | |
871 | 867 | | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
872 | 875 | | |
| 876 | + | |
873 | 877 | | |
874 | 878 | | |
875 | 879 | | |
876 | 880 | | |
877 | 881 | | |
878 | | - | |
| 882 | + | |
879 | 883 | | |
880 | 884 | | |
881 | 885 | | |
| |||
1390 | 1394 | | |
1391 | 1395 | | |
1392 | 1396 | | |
1393 | | - | |
| 1397 | + | |
1394 | 1398 | | |
1395 | 1399 | | |
1396 | 1400 | | |
| |||
1409 | 1413 | | |
1410 | 1414 | | |
1411 | 1415 | | |
1412 | | - | |
| 1416 | + | |
1413 | 1417 | | |
1414 | 1418 | | |
1415 | 1419 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
0 commit comments