Skip to content

Commit d798231

Browse files
committed
linting is good probably
1 parent 8e5f884 commit d798231

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
lines changed

kiwi/storage/subformat/vagrant_base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636

3737
VagrantConfigDict = Dict['str', xml_parse.vagrantconfig]
3838

39+
3940
class DiskFormatVagrantBase(DiskFormatBase):
4041
"""
4142
Base class for creating vagrant boxes.
@@ -102,7 +103,7 @@ def post_init(self, custom_args: VagrantConfigDict):
102103
self.vagrantconfig = custom_args.pop('vagrantconfig')
103104
self.vagrant_post_init(custom_args)
104105

105-
def vagrant_post_init(self, custom_args: Dict['str', xml_parse.vagrantconfig]) -> None:
106+
def vagrant_post_init(self, custom_args: VagrantConfigDict = None) -> None:
106107
"""
107108
Vagrant provider specific post initialization method
108109

kiwi/storage/subformat/vagrant_libvirt.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
)
2323

2424
# project
25-
from kiwi.storage.subformat.vagrant_base import DiskFormatVagrantBase
25+
from kiwi.storage.subformat.vagrant_base import (
26+
DiskFormatVagrantBase, VagrantConfigDict
27+
)
2628
from kiwi.storage.subformat.qcow2 import DiskFormatQcow2
2729
from kiwi.command import Command
2830

@@ -31,7 +33,7 @@ class DiskFormatVagrantLibVirt(DiskFormatVagrantBase):
3133
"""
3234
**Create a vagrant box for the libvirt provider**
3335
"""
34-
def vagrant_post_init(self) -> None:
36+
def vagrant_post_init(self, custom_args: VagrantConfigDict = None) -> None:
3537
self.image_format = 'vagrant.libvirt.box'
3638
self.provider = 'libvirt'
3739

kiwi/storage/subformat/vagrant_virtualbox.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
from kiwi.storage.subformat.template.virtualbox_ovf import (
2525
VirtualboxOvfTemplate
2626
)
27-
from kiwi.storage.subformat.vagrant_base import DiskFormatVagrantBase
27+
from kiwi.storage.subformat.vagrant_base import (
28+
DiskFormatVagrantBase, VagrantConfigDict
29+
)
2830
from kiwi.storage.subformat.vmdk import DiskFormatVmdk
2931
from kiwi.command import Command
3032

@@ -34,7 +36,7 @@ class DiskFormatVagrantVirtualBox(DiskFormatVagrantBase):
3436
**Create a vagrant box for the virtualbox provider**
3537
"""
3638

37-
def vagrant_post_init(self) -> None:
39+
def vagrant_post_init(self, custom_args: VagrantConfigDict = None) -> None:
3840
self.provider = 'virtualbox'
3941
self.image_format = 'vagrant.virtualbox.box'
4042

kiwi/storage/subformat/vagrant_vmware.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,12 @@
1616
# along with kiwi. If not, see <http://www.gnu.org/licenses/>
1717
#
1818

19-
import os
2019
# from textwrap import dedent
2120
from typing import (
2221
List, Dict
2322
)
24-
from pathlib import PurePath
2523

2624
# project
27-
from kiwi.command import Command
2825
from kiwi.storage.subformat.vagrant_base import (DiskFormatVagrantBase,
2926
VagrantConfigDict)
3027
from kiwi.storage.subformat.vmdk import DiskFormatVmdk
@@ -39,10 +36,10 @@ class DiskFormatVagrantVMware(DiskFormatVagrantBase):
3936
**Create a vagrant box for the vmware provider**
4037
"""
4138

42-
def vagrant_post_init(self, custom_args: VagrantConfigDict) -> None:
39+
def vagrant_post_init(self, custom_args: VagrantConfigDict = None) -> None:
4340
self.image_format = 'vagrant.vmware_desktop.box'
4441
self.provider = 'vmware_desktop'
45-
self.options = self.get_qemu_option_list(custom_args)
42+
self.custom_args = custom_args
4643

4744
def create_box_img(self, temp_image_dir: str) -> List[str]:
4845
"""
@@ -59,7 +56,7 @@ def create_box_img(self, temp_image_dir: str) -> List[str]:
5956
"""
6057
vmdk = DiskFormatVmdk(
6158
self.xml_state, self.root_dir, self.target_dir,
62-
custom_args=self.options
59+
custom_args=self.custom_args
6360
)
6461
try:
6562
vmdk.create_image_format()

0 commit comments

Comments
 (0)