rbtools.commands.review¶
Implementation of rbt review.
New in version 3.0.
Classes
|
Base class for comment subcommands. |
|
Subcommand to add a diff comment to a draft review. |
|
Subcommand to add a file attachment comment to a review draft. |
|
Subcommand to add a general comment to a review draft. |
|
Subcommand to discard a draft review. |
|
Subcommand to create or edit draft reviews. |
|
Subcommand for publishing a review draft. |
|
RBTools command to create and publish reviews. |
|
A subcommand for review actions. |
- class rbtools.commands.review.ReviewSubCommand(options: Namespace, config: Dict, *args, **kwargs)[source]¶
Bases:
BaseSubCommand
A subcommand for review actions.
- needs_api: bool = True[source]¶
Whether the command needs the API client.
If this is set, the initialization of the command will set
api_client
andapi_root
.New in version 3.0.
- Type:
- class rbtools.commands.review.AddCommentSubCommand(options: Namespace, config: Dict, *args, **kwargs)[source]¶
Bases:
ReviewSubCommand
Base class for comment subcommands.
- option_list: List[Union[Option, OptionGroup]] = [<rbtools.commands.base.options.OptionGroup object>][source]¶
Command-line options for this command.
- Type:
list
ofOption
orOptionGroup
- add_comment(text_type)[source]¶
Create the comment.
- Parameters:
text_type (
unicode
) – The text type to use.- Raises:
rbtools.api.errors.APIError – An error occurred while performing API requests.
- class rbtools.commands.review.AddDiffComment(options: Namespace, config: Dict, *args, **kwargs)[source]¶
Bases:
AddCommentSubCommand
Subcommand to add a diff comment to a draft review.
- help_text: str = 'Add a comment to a diff as part of a draft review.'[source]¶
The subcommand’s help text.
- Type:
- option_list: List[Union[Option, OptionGroup]] = [<rbtools.commands.base.options.OptionGroup object>, <rbtools.commands.base.options.OptionGroup object>][source]¶
Command-line options for this command.
- Type:
list
ofOption
orOptionGroup
- add_comment(text_type)[source]¶
Create the comment.
- Parameters:
text_type (
unicode
) – The text type to use.- Raises:
rbtools.api.errors.APIError – An error occurred while performing API requests.
rbtools.commands.CommandError – Another error occurred while creating the comment.
- class rbtools.commands.review.AddFileAttachmentComment(options: Namespace, config: Dict, *args, **kwargs)[source]¶
Bases:
AddCommentSubCommand
Subcommand to add a file attachment comment to a review draft.
- help_text: str = 'Add a comment to a file attachment as part of a draft review.'[source]¶
The subcommand’s help text.
- Type:
- option_list: List[Union[Option, OptionGroup]] = [<rbtools.commands.base.options.OptionGroup object>, <rbtools.commands.base.options.OptionGroup object>][source]¶
Command-line options for this command.
- Type:
list
ofOption
orOptionGroup
- add_comment(text_type)[source]¶
Create the comment.
- Parameters:
text_type (
unicode
) – The text type to use.- Raises:
rbtools.api.errors.APIError – An error occurred while performing API requests.
- class rbtools.commands.review.AddGeneralComment(options: Namespace, config: Dict, *args, **kwargs)[source]¶
Bases:
AddCommentSubCommand
Subcommand to add a general comment to a review draft.
- help_text: str = 'Add a general comment as part of a draft review.'[source]¶
The subcommand’s help text.
- Type:
- add_comment(text_type)[source]¶
Create the comment.
- Parameters:
text_type (
unicode
) – The text type to use.- Raises:
rbtools.api.errors.APIError – An error occurred while performing API requests.
- class rbtools.commands.review.Discard(options: Namespace, config: Dict, *args, **kwargs)[source]¶
Bases:
ReviewSubCommand
Subcommand to discard a draft review.
- class rbtools.commands.review.Edit(options: Namespace, config: Dict, *args, **kwargs)[source]¶
Bases:
ReviewSubCommand
Subcommand to create or edit draft reviews.
- option_list: List[Union[Option, OptionGroup]] = [<rbtools.commands.base.options.OptionGroup object>][source]¶
Command-line options for this command.
- Type:
list
ofOption
orOptionGroup
- class rbtools.commands.review.Publish(options: Namespace, config: Dict, *args, **kwargs)[source]¶
Bases:
ReviewSubCommand
Subcommand for publishing a review draft.
- class rbtools.commands.review.Review(transport_cls: Type[Transport] = <class 'rbtools.api.transport.sync.SyncTransport'>, stdout: TextIO = <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>, stderr: TextIO = <_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'>, stdin: TextIO = <_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'>)[source]¶
Bases:
BaseMultiCommand
RBTools command to create and publish reviews.
- description: str = 'Creates, updates, and edits reviews.'[source]¶
A short description of the command, suitable for display in usage text.
- Type:
- subcommands: List[Type[BaseSubCommand]] = [<class 'rbtools.commands.review.Edit'>, <class 'rbtools.commands.review.Publish'>, <class 'rbtools.commands.review.AddDiffComment'>, <class 'rbtools.commands.review.AddGeneralComment'>, <class 'rbtools.commands.review.AddFileAttachmentComment'>, <class 'rbtools.commands.review.Discard'>][source]¶
The available subcommands.
This is a list of BaseSubCommand subclasses.
- Type:
- common_subcommand_option_list: List[Union[Option, OptionGroup]] = [<rbtools.commands.base.options.OptionGroup object>, <rbtools.commands.base.options.OptionGroup object>][source]¶
Options common to all subcommands.
- Type: