original_docstring: List all settings for the specified plugin with their names, environment variables, and current values.
docstring: List all settings for the specified plugin with their names, environment variables, and current values.
docstring_tokens: List all settings for the specified plugin with their names environment variables and current values .
code: def list_settings(ctx, extras):
      """List all settings for the specified plugin with their names, environment variables, and current values."""
      settings = ctx.obj["settings"]
      session = ctx.obj["session"]
  
      printed_custom_heading = False
      printed_extra_heading = extras
  
      # If `--extras` is not specified (`False`), we still want to load both
      # regular and extra settings, since we show custom extras.
      load_extras = True if extras else None
  
      full_config = settings.config_with_metadata(session=session, extras=load_extras)
      for name, config_metadata in full_config.items():
          value = config_metadata["value"]
          source = config_metadata["source"]
          setting_def = config_metadata["setting"]
  
          if extras:
              if not setting_def.is_extra:
                  continue
  
              if setting_def.is_custom and not printed_custom_heading:
                  click.echo()
                  click.echo("Custom:")
                  printed_custom_heading = True
          elif setting_def.is_extra:
              if not setting_def.is_custom:
                  continue
  
              if not printed_extra_heading:
                  click.echo()
                  click.echo("Custom extras, plugin-specific options handled by Meltano:")
                  printed_extra_heading = True
          elif setting_def.is_custom and not printed_custom_heading:
              click.echo()
              click.echo("Custom, possibly unsupported by the plugin:")
              printed_custom_heading = True
  
          click.secho(name, fg="blue", nl=False)
  
          env_keys = [var.definition for var in settings.setting_env_vars(setting_def)]
          click.echo(f" [env: {', '.join(env_keys)}]", nl=False)
  
          if source is not SettingValueStore.DEFAULT:
              default_value = setting_def.value
              if default_value is not None:
                  click.echo(f" (default: {default_value!r})", nl=False)
  
          if source is SettingValueStore.DEFAULT:
              label = "default"
          elif source is SettingValueStore.INHERITED:
              label = f"inherited from '{settings.plugin.parent.name}'"
          else:
              label = f"from {source.label}"
  
          current_value = click.style(f"{value!r}", fg="green")
          click.echo(f" current value: {current_value}", nl=False)
  
          unexpanded_value = config_metadata.get("unexpanded_value")
          if not unexpanded_value or unexpanded_value == value:
              click.echo(f" ({label})")
          else:
              click.echo(f" ({label}: {unexpanded_value!r})")
  
          if setting_def.description:
              click.echo("\t", nl=False)
              if setting_def.label:
                  click.echo(f"{setting_def.label}: ", nl=False)
              click.echo(f"{setting_def.description}")
  
      docs_url = settings.docs_url
      if docs_url:
          click.echo()
          click.echo(
              f"To learn more about {settings.label} and its settings, visit {docs_url}"
          )
code_tokens: def list_settings ( ctx , extras ) : settings = ctx . obj [ "settings" ] session = ctx . obj [ "session" ] printed_custom_heading = False printed_extra_heading = extras load_extras = True if extras else None full_config = settings . config_with_metadata ( session = session , extras = load_extras ) for name , config_metadata in full_config . items ( ) : value = config_metadata [ "value" ] source = config_metadata [ "source" ] setting_def = config_metadata [ "setting" ] if extras : if not setting_def . is_extra : continue if setting_def . is_custom and not printed_custom_heading : click . echo ( ) click . echo ( "Custom:" ) printed_custom_heading = True elif setting_def . is_extra : if not setting_def . is_custom : continue if not printed_extra_heading : click . echo ( ) click . echo ( "Custom extras, plugin-specific options handled by Meltano:" ) printed_extra_heading = True elif setting_def . is_custom and not printed_custom_heading : click . echo ( ) click . echo ( "Custom, possibly unsupported by the plugin:" ) printed_custom_heading = True click . secho ( name , fg = "blue" , nl = False ) env_keys = [ var . definition for var in settings . setting_env_vars ( setting_def ) ] click . echo ( f" [env: {', '.join(env_keys)}]" , nl = False ) if source is not SettingValueStore . DEFAULT : default_value = setting_def . value if default_value is not None : click . echo ( f" (default: {default_value!r})" , nl = False ) if source is SettingValueStore . DEFAULT : label = "default" elif source is SettingValueStore . INHERITED : label = f"inherited from '{settings.plugin.parent.name}'" else : label = f"from {source.label}" current_value = click . style ( f"{value!r}" , fg = "green" ) click . echo ( f" current value: {current_value}" , nl = False ) unexpanded_value = config_metadata . get ( "unexpanded_value" ) if not unexpanded_value or unexpanded_value == value : click . echo ( f" ({label})" ) else : click . echo ( f" ({label}: {unexpanded_value!r})" ) if setting_def . description : click . echo ( "\t" , nl = False ) if setting_def . label : click . echo ( f"{setting_def.label}: " , nl = False ) click . echo ( f"{setting_def.description}" ) docs_url = settings . docs_url if docs_url : click . echo ( ) click . echo ( f"To learn more about {settings.label} and its settings, visit {docs_url}" )
short_docstring: List all settings for the specified plugin with their names, environment variables, and current values.
short_docstring_tokens: List all settings for the specified plugin with their names environment variables and current values .
comment: """List all settings for the specified plugin with their names, environment variables, and current values."""$SEP$# If `--extras` is not specified (`False`), we still want to load both$SEP$# regular and extra settings, since we show custom extras.