Commit 3fcd11a
Balazs Gibizer
Enable mypy on libvirt/guest.py
This patch fixes couple of thing that is needed to run mypy
* fixed a wrong type hint in LibvirtDriver._add_vtpm_device,
_configure_guest_by_virt_type, and _conf_non_lxc signature
* fixed a local variable type hint in LibvirtDriver._create_guest_with_network
* added an assert to _create_guest_with_network as the guest local
variable can be None if we get eventlet.timeout.Timeout and
CONF.vif_plugging_is_fatal is False.
Change-Id: I42c579531bac61063a381598094720271364ec92
(cherry picked from commit c17f1e1)1 parent 5f488d8 commit 3fcd11a
3 files changed
+12
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6032 | 6032 | | |
6033 | 6033 | | |
6034 | 6034 | | |
6035 | | - | |
| 6035 | + | |
6036 | 6036 | | |
6037 | 6037 | | |
6038 | 6038 | | |
| |||
6225 | 6225 | | |
6226 | 6226 | | |
6227 | 6227 | | |
6228 | | - | |
| 6228 | + | |
6229 | 6229 | | |
6230 | 6230 | | |
6231 | 6231 | | |
| |||
6327 | 6327 | | |
6328 | 6328 | | |
6329 | 6329 | | |
6330 | | - | |
| 6330 | + | |
6331 | 6331 | | |
6332 | 6332 | | |
6333 | 6333 | | |
| |||
7258 | 7258 | | |
7259 | 7259 | | |
7260 | 7260 | | |
7261 | | - | |
| 7261 | + | |
7262 | 7262 | | |
7263 | 7263 | | |
7264 | 7264 | | |
| |||
7304 | 7304 | | |
7305 | 7305 | | |
7306 | 7306 | | |
| 7307 | + | |
7307 | 7308 | | |
7308 | 7309 | | |
7309 | 7310 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
44 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
45 | 50 | | |
46 | 51 | | |
47 | 52 | | |
| |||
0 commit comments