summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2022-06-17 23:02:47 +0200
committerFlorian Bruhin <me@the-compiler.org>2022-06-17 23:02:47 +0200
commit1e8d2789027fbd5056c9c33e6d2d4a1530d81f33 (patch)
treeb3f753003b6186959aa8c5c7d3820853a61a22bc
parentc8d6b264ae47a8f5143b9a3d9b69f244d0c75578 (diff)
downloadqutebrowser-1e8d2789027fbd5056c9c33e6d2d4a1530d81f33.tar.gz
qutebrowser-1e8d2789027fbd5056c9c33e6d2d4a1530d81f33.zip
Fix lint
-rw-r--r--qutebrowser/browser/greasemonkey.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/qutebrowser/browser/greasemonkey.py b/qutebrowser/browser/greasemonkey.py
index 674ccaad1..a0bff89fd 100644
--- a/qutebrowser/browser/greasemonkey.py
+++ b/qutebrowser/browser/greasemonkey.py
@@ -236,6 +236,10 @@ class LoadResults:
errors: List[Tuple[str, str]] = dataclasses.field(default_factory=list)
def successful_str(self) -> str:
+ """Get a string with all successfully loaded scripts.
+
+ This can be used e.g. for a message.info() call.
+ """
if not self.successful:
return "No Greasemonkey scripts loaded"
@@ -243,6 +247,11 @@ class LoadResults:
return f"Loaded Greasemonkey scripts:\n\n{names}"
def error_str(self) -> Optional[str]:
+ """Get a string with all errors during script loading.
+
+ This can be used e.g. for a message.error() call.
+ If there were no errors, None is returned.
+ """
if not self.errors:
return None