gtristan commented on pull request #1438:
URL: https://github.com/apache/buildstream/pull/1438#issuecomment-775659797


   > tl;dr I think it's preferrable to use singular option names in both cases 
- i.e. whether multiple remotes are allowed or just one.
   
   Agreed, the patch is implemented already as you suggest.
   
   e.g.:
   
   ```python
   @click.option(
       "--remote",
       "remotes",
       type=RemoteSpecType(RemoteSpecPurpose.PULL),
       multiple=True,
       help="A remote for downloading sources",
   )
   ```
   Here the CLI option is `--remote` while the variable name passed to the 
function is a list named `remotes`.
   
   When observing `--help` output, the value type `REMOTE` is derived from the 
newly added `RemoteSpecType` (click ParamType derivative), it will show 
something like:
   
   > --remote   REMOTE   Some command specific bla bla to feed to the 
blabbernaught
   
   Regarding documentation, I opted to add a single general section to the 
`Using -> Commands` section explaining how to fully specify remotes, and 
explaining that all `--remote` like options can be specified multiple times.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to