@@ -32,7 +32,7 @@ def cli() -> None: # pragma: no cover
3232 parser .add_argument (
3333 "--format" ,
3434 "-f" ,
35- help = f"Output format. one of: { ', ' .join (set ( fmt .formatMap ) )} . default=simple" ,
35+ help = f"Output format. one of: { ', ' .join (x . value for x in fmt .FMT )} . default=simple" ,
3636 )
3737 parser .add_argument (
3838 "--requirements-paths" ,
@@ -84,7 +84,7 @@ def cli() -> None: # pragma: no cover
8484 )
8585 parser .add_argument (
8686 "--skip-dependencies" ,
87- help = "set of packages/dependencies to skip (this sets the 'compatability ' to True)" ,
87+ help = "set of packages/dependencies to skip (this sets the 'compatibility ' to True)" ,
8888 nargs = "+" ,
8989 )
9090 parser .add_argument (
@@ -109,6 +109,9 @@ def cli() -> None: # pragma: no cover
109109 )
110110 args = vars (parser .parse_args ())
111111
112+ if args .get ("format" , "simple" ) not in fmt .FMT :
113+ args ["format" ] = "simple"
114+
112115 stdin_path = Path ("__stdin__" )
113116 if not args .get ("requirements_paths" ):
114117 if stdin .isatty ():
@@ -182,11 +185,10 @@ def main(licensecheckConf: LC_Config) -> int:
182185 )
183186 raise ValueError (msg )
184187
185- format_ = licensecheckConf .format or "simple"
186- if licensecheckConf .format in fmt .formatMap :
188+ if licensecheckConf .format in fmt .FMT :
187189 print (
188190 fmt .fmt (
189- format_ ,
191+ licensecheckConf . format ,
190192 this_license ,
191193 sorted (depsWithLicenses ),
192194 hide_output_parameters ,
0 commit comments