File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
src/ceph-volume/ceph_volume/devices/lvm Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 1010from . import zap
1111from . import batch
1212from . import migrate
13+ from typing import List , Optional
1314
1415
15- class LVM ( object ) :
16+ class LVM :
1617
1718 help = 'Use LVM and LVM-based technologies to deploy OSDs'
1819
@@ -36,19 +37,21 @@ class LVM(object):
3637 'new-db' : migrate .NewDB ,
3738 }
3839
39- def __init__ (self , argv ) :
40+ def __init__ (self , argv : Optional [ List [ str ]]) -> None :
4041 self .argv = argv
4142
42- def print_help (self , sub_help ) :
43+ def print_help (self , sub_help : str ) -> str :
4344 return self ._help .format (sub_help = sub_help )
4445
45- def main (self ):
46+ def main (self ) -> None :
4647 terminal .dispatch (self .mapper , self .argv )
4748 parser = argparse .ArgumentParser (
4849 prog = 'ceph-volume lvm' ,
4950 formatter_class = argparse .RawDescriptionHelpFormatter ,
5051 description = self .print_help (terminal .subhelp (self .mapper )),
5152 )
53+ if self .argv is None :
54+ self .argv = []
5255 parser .parse_args (self .argv )
5356 if len (self .argv ) <= 1 :
54- return parser .print_help ()
57+ parser .print_help ()
You can’t perform that action at this time.
0 commit comments