@@ -15,7 +15,10 @@ def setup_arguments(cls, subparsers):
1515 parser = subparsers .add_parser (
1616 "validate" ,
1717 help = "Validates an ASDF file." ,
18- description = "validates \n - against all tagged schemas (and optionally a custom schema) \n - blocks with stored checksums (can be disabled)" ,
18+ description = (
19+ "Validates tree against all tagged schemas (and optionally a custom schema) "
20+ "and blocks with stored checksums."
21+ ),
1922 )
2023
2124 parser .add_argument ("filename" , help = "path to ASDF file" )
@@ -39,14 +42,17 @@ def run(cls, args):
3942 validate (args .filename , args .custom_schema , args .skip_block_validation )
4043
4144
42- def validate (filename , custom_schema , skip_checksums ):
45+ def validate (filename , custom_schema , skip_block_validation ):
4346 # if we are skipping checksums we can lazy load, otherwise don't
4447 with asdf .open (
45- filename , custom_schema = custom_schema , validate_checksums = not skip_checksums , lazy_load = skip_checksums
48+ filename ,
49+ custom_schema = custom_schema ,
50+ validate_checksums = not skip_block_validation ,
51+ lazy_load = skip_block_validation ,
4652 ) as af : # noqa: F841
4753 msg = f"{ filename } is valid"
4854 if custom_schema :
4955 msg += f", conforms to { custom_schema } "
50- if not skip_checksums :
51- msg += ", and block checksums match"
56+ if not skip_block_validation :
57+ msg += ", and block checksums match contents "
5258 print (msg )
0 commit comments