Commit 15157e5
committed
MNT: use less eval
In the textbox example we need eval because we are taking symbolic input from
the user and then plotting it. I restricted the namespaces a bit to set a
better example, but I think we fundamentally do need to use `eval` in this
case.
In the qt editor eval was changed to ast.literal_eval which only
handles literals so is safer.1 parent 370547e commit 15157e5
File tree
2 files changed
+4
-2
lines changed- galleries/examples/widgets
- lib/matplotlib/backends/qt_editor
2 files changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| |||
351 | 353 | | |
352 | 354 | | |
353 | 355 | | |
354 | | - | |
| 356 | + | |
355 | 357 | | |
356 | 358 | | |
357 | 359 | | |
| |||
0 commit comments