Commit 4fdaca8
committed
Deprecate trivial helpers in style.core.
STYLE_FILE_PATTERN is unused, the usual approach would be to check
whether a path's suffix matches STYLE_EXTENSION.
load_base_library is just a one-liner used in one place; hiding it
behind a function only obscures things.
iter_user_library is a combo of os.path.expanduser (which can be
inlined) and checking whether entries are existing directories (which is
unnecessary in update_user_library) as Path.glob helpfully returns empty
lists when globbing non-existing paths or into non-directories.
(Also note that none of these APIs are exported in `style/__init__.py`,
which is the real "intended public" API.)1 parent a510e32 commit 4fdaca8
File tree
2 files changed
+10
-4
lines changed- doc/api/next_api_changes/deprecations
- lib/matplotlib/style
2 files changed
+10
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| |||
155 | 157 | | |
156 | 158 | | |
157 | 159 | | |
| 160 | + | |
158 | 161 | | |
159 | 162 | | |
160 | 163 | | |
161 | 164 | | |
162 | 165 | | |
163 | 166 | | |
| 167 | + | |
164 | 168 | | |
165 | 169 | | |
166 | 170 | | |
| |||
170 | 174 | | |
171 | 175 | | |
172 | 176 | | |
173 | | - | |
| 177 | + | |
174 | 178 | | |
175 | 179 | | |
176 | 180 | | |
| |||
204 | 208 | | |
205 | 209 | | |
206 | 210 | | |
207 | | - | |
208 | | - | |
| 211 | + | |
209 | 212 | | |
210 | | - | |
211 | 213 | | |
212 | 214 | | |
213 | 215 | | |
| |||
0 commit comments