diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2022-01-16 10:15:55 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2022-01-16 10:15:55 +0100 |
commit | c775242a4ca9b4cc3606f76a4a21ae74a5481fcc (patch) | |
tree | 68420af3f2e7503603ce262677e15dd6c57c6da9 /doc/fr | |
parent | 619f09f2d6fe267cebeb56ef652afda830031dce (diff) | |
download | weechat-c775242a4ca9b4cc3606f76a4a21ae74a5481fcc.zip |
doc: remove useless comparison with empty string in Python examples (plugin API reference)
Diffstat (limited to 'doc/fr')
-rw-r--r-- | doc/fr/weechat_plugin_api.fr.adoc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/doc/fr/weechat_plugin_api.fr.adoc b/doc/fr/weechat_plugin_api.fr.adoc index 0477c7b82..f51ed340a 100644 --- a/doc/fr/weechat_plugin_api.fr.adoc +++ b/doc/fr/weechat_plugin_api.fr.adoc @@ -9523,9 +9523,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 @@ -9543,9 +9543,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 @@ -9750,9 +9750,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 @@ -13012,7 +13012,7 @@ def buffer_clear(buffer: str) -> int: ... # exemple buffer = weechat.buffer_search("mon_extension", "mon_tampon") -if buffer != "": +if buffer: weechat.buffer_clear(buffer) ---- |