diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2021-05-13 19:43:37 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2021-05-13 20:24:59 +0200 |
commit | a5903e80208856bf163ad3d356037c2f3785003d (patch) | |
tree | 3d718195ea7f4afbdc2611a97ada64318da32d50 | |
parent | fafe2c9d2e3474037efa43d342a7277170972c12 (diff) | |
download | weechat-a5903e80208856bf163ad3d356037c2f3785003d.zip |
doc: add type annotations in Python prototype (scripting guide) (issue #1377)
-rw-r--r-- | doc/de/weechat_scripting.de.adoc | 4 | ||||
-rw-r--r-- | doc/en/weechat_scripting.en.adoc | 4 | ||||
-rw-r--r-- | doc/fr/weechat_scripting.fr.adoc | 4 | ||||
-rw-r--r-- | doc/it/weechat_scripting.it.adoc | 4 | ||||
-rw-r--r-- | doc/ja/weechat_scripting.ja.adoc | 4 | ||||
-rw-r--r-- | doc/pl/weechat_scripting.pl.adoc | 4 |
6 files changed, 12 insertions, 12 deletions
diff --git a/doc/de/weechat_scripting.de.adoc b/doc/de/weechat_scripting.de.adoc index 71a147bfe..3eab42075 100644 --- a/doc/de/weechat_scripting.de.adoc +++ b/doc/de/weechat_scripting.de.adoc @@ -222,11 +222,11 @@ Funktionen werden aufgerufen mittels `+weechat_xxx(arg1, arg2, ...);+`. Ein WeeChat-Skript muss sich bei WeeChat "registrieren". Dazu muss das Skript zuerst die "register" Funktion ausführen. -Prototyp: +Prototyp (Python): [source,python] ---- -weechat.register(Name, Author, Version, Lizenz, Beschreibung, Shutdown_Funktion, Zeichensatz) +def register(name: str, author: str, version: str, license: str, description: str, shutdown_function: str, charset: str) -> int: ... ---- Argumente: diff --git a/doc/en/weechat_scripting.en.adoc b/doc/en/weechat_scripting.en.adoc index 34b26fe96..71a593ef1 100644 --- a/doc/en/weechat_scripting.en.adoc +++ b/doc/en/weechat_scripting.en.adoc @@ -212,11 +212,11 @@ Functions are called with `+weechat_xxx(arg1, arg2, ...);+`. All WeeChat scripts must "register" themselves to WeeChat, and this must be first WeeChat function called in script. -Prototype: +Prototype (Python): [source,python] ---- -weechat.register(name, author, version, license, description, shutdown_function, charset) +def register(name: str, author: str, version: str, license: str, description: str, shutdown_function: str, charset: str) -> int: ... ---- Arguments: diff --git a/doc/fr/weechat_scripting.fr.adoc b/doc/fr/weechat_scripting.fr.adoc index 8eabbf1e9..f7ecfa301 100644 --- a/doc/fr/weechat_scripting.fr.adoc +++ b/doc/fr/weechat_scripting.fr.adoc @@ -222,11 +222,11 @@ Les fonctions sont appelées par `+weechat_xxx(arg1, arg2, ...);+`. Tous les scripts WeeChat doivent s'enregistrer ("register") auprès de WeeChat, et cela doit être la première fonction WeeChat appelée dans le script. -Prototype : +Prototype (Python) : [source,python] ---- -weechat.register(name, author, version, license, description, shutdown_function, charset) +def register(name: str, author: str, version: str, license: str, description: str, shutdown_function: str, charset: str) -> int: ... ---- Paramètres : diff --git a/doc/it/weechat_scripting.it.adoc b/doc/it/weechat_scripting.it.adoc index 89861038c..a36b06fac 100644 --- a/doc/it/weechat_scripting.it.adoc +++ b/doc/it/weechat_scripting.it.adoc @@ -233,11 +233,11 @@ Functions are called with `+weechat_xxx(arg1, arg2, ...);+`. Tutti gli script WeeChat devono "registrare" loro stessi in WeeChat, e questo deve essere la prima funzione chiamata nello script di WeeChat. -Prototipo: +Prototipo (Python): [source,python] ---- -weechat.register(name, author, version, license, description, shutdown_function, charset) +def register(name: str, author: str, version: str, license: str, description: str, shutdown_function: str, charset: str) -> int: ... ---- Argomenti: diff --git a/doc/ja/weechat_scripting.ja.adoc b/doc/ja/weechat_scripting.ja.adoc index 6341bb1e3..b7b397b3c 100644 --- a/doc/ja/weechat_scripting.ja.adoc +++ b/doc/ja/weechat_scripting.ja.adoc @@ -230,11 +230,11 @@ Functions are called with `+weechat_xxx(arg1, arg2, ...);+`. 全ての WeeChat スクリプトは WeeChat に自分自身を「登録」し、登録はスクリプトの最初で行われなければいけません。 -プロトタイプ: +プロトタイプ (Python): [source,python] ---- -weechat.register(name, author, version, license, description, shutdown_function, charset) +def register(name: str, author: str, version: str, license: str, description: str, shutdown_function: str, charset: str) -> int: ... ---- 引数: diff --git a/doc/pl/weechat_scripting.pl.adoc b/doc/pl/weechat_scripting.pl.adoc index 43d4060f2..5d552112e 100644 --- a/doc/pl/weechat_scripting.pl.adoc +++ b/doc/pl/weechat_scripting.pl.adoc @@ -217,11 +217,11 @@ Funkcje są wywoływane za pomocą `+weechat_xxx(arg1, arg2, ...);+`. Wszystkie skrypty WeeChat muszą się "zarejestrować" w WeeChat, musi to być pierwsza z funkcji WeeChat wywołana w skrypcie. -Prototyp: +Prototyp (Python): [source,python] ---- -weechat.register(nazwa, autor, wersja, licencja, opis, funkcja_wyłączająca, kodowanie) +def register(nazwa: str, autor: str, wersja: str, licencja: str, opis: str, funkcja_wyłączająca: str, kodowanie: str) -> int: ... ---- Argumenty: |