"""Pure recognition of CLI metadata invocations.Help and version surfaces must remain available even when operator state cannotbe opened. This import-light predicate is shared by CLI startup, output, andlogging so each boundary agrees on exactly which invocation tokens have thatmetadata-only posture."""from__future__importannotationsfromcollections.abcimportSequence_METADATA_ARGUMENTS=frozenset({"--help","-h","--version","-V"})
[docs]defis_metadata_invocation(arguments:Sequence[str])->bool:"""Return whether ``arguments`` request help or version metadata."""returnany(argumentin_METADATA_ARGUMENTSforargumentinarguments)