From c775242a4ca9b4cc3606f76a4a21ae74a5481fcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 16 Jan 2022 10:15:55 +0100 Subject: doc: remove useless comparison with empty string in Python examples (plugin API reference) --- doc/fr/weechat_plugin_api.fr.adoc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'doc/fr') 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) ---- -- cgit v1.2.3