mirror of
https://github.com/weechat/weechat.git
synced 2026-07-07 10:13:12 +02:00
doc: remove useless comparison with empty string in Python examples (plugin API reference)
This commit is contained in:
@@ -9351,9 +9351,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
|
||||
|
||||
@@ -9371,9 +9371,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
|
||||
|
||||
@@ -9573,9 +9573,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
|
||||
|
||||
@@ -12735,7 +12735,7 @@ def buffer_clear(buffer: str) -> int: ...
|
||||
|
||||
# example
|
||||
buffer = weechat.buffer_search("my_plugin", "my_buffer")
|
||||
if buffer != "":
|
||||
if buffer:
|
||||
weechat.buffer_clear(buffer)
|
||||
----
|
||||
|
||||
|
||||
@@ -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)
|
||||
----
|
||||
|
||||
|
||||
@@ -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)
|
||||
----
|
||||
|
||||
|
||||
@@ -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)
|
||||
----
|
||||
|
||||
|
||||
@@ -9029,9 +9029,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
|
||||
|
||||
@@ -9049,9 +9049,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
|
||||
|
||||
@@ -9244,9 +9244,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
|
||||
|
||||
@@ -12273,7 +12273,7 @@ def buffer_clear(buffer: str) -> int: ...
|
||||
|
||||
# пример
|
||||
buffer = weechat.buffer_search("my_plugin", "my_buffer")
|
||||
if buffer != "":
|
||||
if buffer:
|
||||
weechat.buffer_clear(buffer)
|
||||
----
|
||||
|
||||
|
||||
Reference in New Issue
Block a user