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/ja | |
parent | 619f09f2d6fe267cebeb56ef652afda830031dce (diff) | |
download | weechat-c775242a4ca9b4cc3606f76a4a21ae74a5481fcc.zip |
doc: remove useless comparison with empty string in Python examples (plugin API reference)
Diffstat (limited to 'doc/ja')
-rw-r--r-- | doc/ja/weechat_plugin_api.ja.adoc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/doc/ja/weechat_plugin_api.ja.adoc b/doc/ja/weechat_plugin_api.ja.adoc index ba18830a6..20c7af10f 100644 --- a/doc/ja/weechat_plugin_api.ja.adoc +++ b/doc/ja/weechat_plugin_api.ja.adoc @@ -9373,9 +9373,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 @@ -9393,9 +9393,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 @@ -9597,9 +9597,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 @@ -12790,7 +12790,7 @@ def buffer_clear(buffer: str) -> int: ... # 例 buffer = weechat.buffer_search("my_plugin", "my_buffer") -if buffer != "": +if buffer: weechat.buffer_clear(buffer) ---- |