simplelogincmd.cli.util.output.get_display_fields_from_options

get_display_fields_from_options(valid_fields: list[str], inclusions: str | None, exclusions: str | None) list[str]

Make a list of valid fields based on which should be included and excluded

Produce a list consisting of the valid items in inclusions (or those in valid_fields itself, if inclusions is empty), except for those found in exclusions. Comparisons are case-insensitive.

Parameters:
  • valid_fields (list[str]) – All the possible valid fields

  • inclusions (str) – A comma-separated list of fields to be included. If empty, then assume all of valid_fields are to be included. Otherwise, include only the valid fields found in this list

  • exclusions (str) – Exclude any valid fields in this comma-separated list from the result

Returns:

The valid fields as requested

Return type:

list[str], might be empty