rbtools.commands.review¶
Implementation of rbt review.
Added 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.AddCommentSubCommand(options: Namespace, config: RBToolsConfig, *args, **kwargs)[source]¶
Bases:
ReviewSubCommandBase class for comment subcommands.
- __firstlineno__ = 83¶
- __static_attributes__ = ()¶
- 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: RBToolsConfig, *args, **kwargs)[source]¶
Bases:
AddCommentSubCommandSubcommand to add a diff comment to a draft review.
- __annotations_cache__ = {}¶
- __firstlineno__ = 133¶
- __static_attributes__ = ()¶
- 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: RBToolsConfig, *args, **kwargs)[source]¶
Bases:
AddCommentSubCommandSubcommand to add a file attachment comment to a review draft.
- __annotations_cache__ = {}¶
- __firstlineno__ = 234¶
- __static_attributes__ = ()¶
- 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: RBToolsConfig, *args, **kwargs)[source]¶
Bases:
AddCommentSubCommandSubcommand to add a general comment to a review draft.
- __annotations_cache__ = {}¶
- __firstlineno__ = 290¶
- __static_attributes__ = ()¶
- 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: RBToolsConfig, *args, **kwargs)[source]¶
Bases:
ReviewSubCommandSubcommand to discard a draft review.
- __annotations_cache__ = {}¶
- __firstlineno__ = 317¶
- __static_attributes__ = ()¶
- class rbtools.commands.review.Edit(options: Namespace, config: RBToolsConfig, *args, **kwargs)[source]¶
Bases:
ReviewSubCommandSubcommand to create or edit draft reviews.
- __annotations_cache__ = {}¶
- __firstlineno__ = 341¶
- __static_attributes__ = ()¶
- class rbtools.commands.review.Publish(options: Namespace, config: RBToolsConfig, *args, **kwargs)[source]¶
Bases:
ReviewSubCommandSubcommand for publishing a review draft.
- __annotations_cache__ = {}¶
- __firstlineno__ = 413¶
- __static_attributes__ = ()¶
- 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:
BaseMultiCommandRBTools command to create and publish reviews.
- __firstlineno__ = 436¶
- __static_attributes__ = ()¶
- common_subcommand_option_list: list[Option | OptionGroup] = [<rbtools.commands.base.options.OptionGroup object>, <rbtools.commands.base.options.OptionGroup object>][source]¶
Options common to all subcommands.
- Type:
- description: ClassVar[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:
- class rbtools.commands.review.ReviewSubCommand(options: Namespace, config: RBToolsConfig, *args, **kwargs)[source]¶
Bases:
BaseSubCommandA subcommand for review actions.
- __annotations_cache__ = {}¶
- __firstlineno__ = 24¶
- __static_attributes__ = ()¶
- get_review_draft() ReviewItemResource[source]¶
Return the review draft, creating if desired.
- Returrns:
rbtools.api.resource.ReviewItemResource: The review draft resource.