AppStreamCompose.Hint¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent_instance |
r |
Class Details¶
- class AppStreamCompose.Hint(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new_for_tag(tag)¶
- Parameters:
tag (
str) – The tag ID to construct this hint for.- Raises:
- Return type:
Creates a new
AppStreamCompose.Hintwith the given tag. If the selected tag was not registered+ with the global tag registry,Noneis returned and an error is set.Added in version 0.14.0.
- add_explanation_var(var_name, text)¶
- Parameters:
Add a replacement variable for the explanation text.
Added in version 0.13.0.
- format_explanation()¶
- Returns:
Explanation text for this hint as HTML.
- Return type:
Formats the explanation template to return a human-readable issue hint explanation, with all placeholder variables replaced.
Explanation templates contain markup, so the result of this function is a snippet of HTML, ready to be embedded into a generated report.
Use
AppStreamCompose.Hint.format_explanation_plainif you need text to display without HTML markup.Added in version 0.13.0.
- format_explanation_plain()¶
- Returns:
Explanation text for this hint as plain text.
- Return type:
Formats the explanation template like
AppStreamCompose.Hint.format_explanationdoes, but resolves all markup of the template into plain text: emphasis is dropped, code spans are marked the way Markdown does, line breaks become actual line breaks, links are reduced to their text followed by the URL they point to, and escaped characters are unescaped.Added in version 1.2.0.
- get_explanation_template()¶
- Return type:
Gets the explanation template for this hint.
Added in version 0.13.0.
- get_explanation_vars_list()¶
- Returns:
A flattened
GLib.PtrArraywith the key/value pairs.- Return type:
[
str]
Returns a list with the flattened key/value pairs for this hint. Values are located in uneven list entries, following their keys in even list entries.
Added in version 0.14.0.
- get_severity()¶
- Return type:
Gets the issue severity of this hint.
Added in version 0.13.0.
- is_error()¶
-
Added in version 0.13.0.