summaryrefslogtreecommitdiff
path: root/doc/it/weechat_plugin_api.it.adoc
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2022-01-16 10:15:55 +0100
committerSébastien Helleu <flashcode@flashtux.org>2022-01-16 10:15:55 +0100
commitc775242a4ca9b4cc3606f76a4a21ae74a5481fcc (patch)
tree68420af3f2e7503603ce262677e15dd6c57c6da9 /doc/it/weechat_plugin_api.it.adoc
parent619f09f2d6fe267cebeb56ef652afda830031dce (diff)
downloadweechat-c775242a4ca9b4cc3606f76a4a21ae74a5481fcc.zip
doc: remove useless comparison with empty string in Python examples (plugin API reference)
Diffstat (limited to 'doc/it/weechat_plugin_api.it.adoc')
-rw-r--r--doc/it/weechat_plugin_api.it.adoc14
1 files changed, 7 insertions, 7 deletions
diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc
index 8710dff8f..311ec3c2e 100644
--- a/doc/it/weechat_plugin_api.it.adoc
+++ b/doc/it/weechat_plugin_api.it.adoc
@@ -9644,9 +9644,9 @@ def my_process_cb(data, command, return_code, out, err):
return weechat.WEECHAT_RC_OK
if return_code >= 0:
weechat.prnt("", "return_code = %d" % return_code)
- if out != "":
+ if out:
weechat.prnt("", "stdout: %s" % out)
- if err != "":
+ if err:
weechat.prnt("", "stderr: %s" % err)
return weechat.WEECHAT_RC_OK
@@ -9664,9 +9664,9 @@ def my_process_cb(data, command, return_code, out, err):
return weechat.WEECHAT_RC_OK
if return_code >= 0:
weechat.prnt("", "return_code = %d" % return_code)
- if out != "":
+ if out:
weechat.prnt("", "stdout: %s" % out)
- if err != "":
+ if err:
weechat.prnt("", "stderr: %s" % err)
return weechat.WEECHAT_RC_OK
@@ -9877,9 +9877,9 @@ def my_process_cb(data, command, return_code, out, err):
return weechat.WEECHAT_RC_OK
if return_code >= 0:
weechat.prnt("", "return_code = %d" % return_code)
- if out != "":
+ if out:
weechat.prnt("", "stdout: %s" % out)
- if err != "":
+ if err:
weechat.prnt("", "stderr: %s" % err)
return weechat.WEECHAT_RC_OK
@@ -13266,7 +13266,7 @@ def buffer_clear(buffer: str) -> int: ...
# esempio
buffer = weechat.buffer_search("my_plugin", "my_buffer")
-if buffer != "":
+if buffer:
weechat.buffer_clear(buffer)
----