Commit dc98efb
committed
Refactor default PartitionTable
Addresses the following:
pyright
```
archinstall/lib/models/device.py:262:10 - error: Type "Literal[PartitionTable.GPT, PartitionTable.MBR]" is not assignable to return type "Self@PartitionTable"
Type "Literal[PartitionTable.GPT, PartitionTable.MBR]" is not assignable to type "Self@PartitionTable" (reportReturnType)
```
ty
```
error[invalid-return-type]: Return type does not match returned value
--> archinstall/lib/models/device.py:261:22
|
261 | def default(cls) -> Self:
| ---- Expected `Self@default` because of return type
262 | return cls.GPT if SysInfo.has_uefi() else cls.MBR
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self@default`, found `PartitionTable`
|
```1 parent d43da6a commit dc98efb
2 files changed
Lines changed: 2 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
48 | | - | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
| |||
257 | 256 | | |
258 | 257 | | |
259 | 258 | | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | 259 | | |
265 | 260 | | |
266 | 261 | | |
| |||
0 commit comments