Commit c361cd0
committed
Refactor code for improved readability and performance
- Updated file reading methods in DropboxFolderCopyReader and DropboxFileCopyReader to use context managers without explicit mode.
- Removed unnecessary future import in parse_format.py.
- Simplified string formatting using f-strings in multiple classes within parse_format.py.
- Replaced old-style class definitions with new-style in various utility classes.
- Optimized recursive directory iteration functions in local_files.py using yield from.
- Enhanced type hinting in w_helpful_folder_not_found_error function.
- Streamlined zip function usage in mk_kv_from_keygen.
- Updated glom.py to use f-strings for better readability in error messages and representations.
- Changed type imports to use collections.abc for better compatibility.
- Refactored mongoquery.py to utilize f-strings for error messages.
- Minor adjustments in tests/utils_for_testing.py for clarity in user prompts.1 parent 0f41b2e commit c361cd0
File tree
11 files changed
+135
-134
lines changed- misc
- py2store
- examples
- persisters
- utils
- tests
11 files changed
+135
-134
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
404 | | - | |
405 | 404 | | |
406 | 405 | | |
407 | 406 | | |
| |||
500 | 499 | | |
501 | 500 | | |
502 | 501 | | |
503 | | - | |
| 502 | + | |
504 | 503 | | |
505 | 504 | | |
506 | 505 | | |
| |||
708 | 707 | | |
709 | 708 | | |
710 | 709 | | |
711 | | - | |
| 710 | + | |
712 | 711 | | |
713 | 712 | | |
714 | 713 | | |
| |||
744 | 743 | | |
745 | 744 | | |
746 | 745 | | |
747 | | - | |
748 | | - | |
| 746 | + | |
| 747 | + | |
749 | 748 | | |
750 | 749 | | |
751 | 750 | | |
| |||
880 | 879 | | |
881 | 880 | | |
882 | 881 | | |
883 | | - | |
| 882 | + | |
884 | 883 | | |
885 | 884 | | |
886 | 885 | | |
| |||
921 | 920 | | |
922 | 921 | | |
923 | 922 | | |
924 | | - | |
| 923 | + | |
925 | 924 | | |
926 | 925 | | |
927 | 926 | | |
| |||
1034 | 1033 | | |
1035 | 1034 | | |
1036 | 1035 | | |
1037 | | - | |
| 1036 | + | |
1038 | 1037 | | |
1039 | 1038 | | |
1040 | 1039 | | |
| |||
1046 | 1045 | | |
1047 | 1046 | | |
1048 | 1047 | | |
1049 | | - | |
| 1048 | + | |
1050 | 1049 | | |
1051 | 1050 | | |
1052 | 1051 | | |
| |||
1059 | 1058 | | |
1060 | 1059 | | |
1061 | 1060 | | |
1062 | | - | |
| 1061 | + | |
1063 | 1062 | | |
1064 | 1063 | | |
1065 | 1064 | | |
| |||
1072 | 1071 | | |
1073 | 1072 | | |
1074 | 1073 | | |
1075 | | - | |
| 1074 | + | |
1076 | 1075 | | |
1077 | 1076 | | |
1078 | 1077 | | |
1079 | 1078 | | |
1080 | 1079 | | |
1081 | 1080 | | |
1082 | | - | |
| 1081 | + | |
1083 | 1082 | | |
1084 | 1083 | | |
1085 | 1084 | | |
| |||
1090 | 1089 | | |
1091 | 1090 | | |
1092 | 1091 | | |
1093 | | - | |
| 1092 | + | |
1094 | 1093 | | |
1095 | 1094 | | |
1096 | 1095 | | |
| |||
1108 | 1107 | | |
1109 | 1108 | | |
1110 | 1109 | | |
1111 | | - | |
| 1110 | + | |
1112 | 1111 | | |
1113 | 1112 | | |
1114 | 1113 | | |
| |||
1154 | 1153 | | |
1155 | 1154 | | |
1156 | 1155 | | |
1157 | | - | |
| 1156 | + | |
1158 | 1157 | | |
1159 | | - | |
| 1158 | + | |
1160 | 1159 | | |
1161 | | - | |
| 1160 | + | |
1162 | 1161 | | |
1163 | 1162 | | |
1164 | 1163 | | |
1165 | 1164 | | |
1166 | | - | |
| 1165 | + | |
1167 | 1166 | | |
1168 | 1167 | | |
1169 | 1168 | | |
| |||
1181 | 1180 | | |
1182 | 1181 | | |
1183 | 1182 | | |
1184 | | - | |
| 1183 | + | |
1185 | 1184 | | |
1186 | 1185 | | |
1187 | | - | |
| 1186 | + | |
1188 | 1187 | | |
1189 | 1188 | | |
1190 | 1189 | | |
| |||
1200 | 1199 | | |
1201 | 1200 | | |
1202 | 1201 | | |
1203 | | - | |
| 1202 | + | |
1204 | 1203 | | |
1205 | 1204 | | |
1206 | 1205 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | | - | |
95 | | - | |
| 94 | + | |
96 | 95 | | |
97 | 96 | | |
98 | 97 | | |
| |||
105 | 104 | | |
106 | 105 | | |
107 | 106 | | |
108 | | - | |
| 107 | + | |
109 | 108 | | |
110 | | - | |
111 | | - | |
| 109 | + | |
112 | 110 | | |
113 | 111 | | |
114 | 112 | | |
| |||
214 | 212 | | |
215 | 213 | | |
216 | 214 | | |
217 | | - | |
| 215 | + | |
| 216 | + | |
218 | 217 | | |
219 | 218 | | |
220 | 219 | | |
221 | 220 | | |
222 | 221 | | |
223 | | - | |
| 222 | + | |
224 | 223 | | |
225 | 224 | | |
226 | 225 | | |
| |||
237 | 236 | | |
238 | 237 | | |
239 | 238 | | |
240 | | - | |
| 239 | + | |
241 | 240 | | |
242 | 241 | | |
243 | 242 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
| 44 | + | |
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
| |||
0 commit comments