mirror of
https://github.com/weechat/weechat.git
synced 2026-07-01 07:16:37 +02:00
doc: fix pylint errors
This commit is contained in:
+4
-2
@@ -56,7 +56,8 @@ def print_stub_constants() -> None:
|
||||
"string": "str",
|
||||
}
|
||||
constant_pattern = re.compile(CONSTANT_RE)
|
||||
with open(DOC_DIR / "weechat_scripting.en.adoc") as scripting_file:
|
||||
with open(DOC_DIR / "weechat_scripting.en.adoc",
|
||||
encoding="utf-8") as scripting_file:
|
||||
scripting = scripting_file.read()
|
||||
for match in constant_pattern.finditer(scripting):
|
||||
print(f'{match["constant"]}: {types[match["type"]]}')
|
||||
@@ -65,7 +66,8 @@ def print_stub_constants() -> None:
|
||||
def print_stub_functions() -> None:
|
||||
"""Print function prototypes, extracted from the Plugin API reference."""
|
||||
function_pattern = re.compile(FUNCTION_RE, re.DOTALL)
|
||||
with open(DOC_DIR / "weechat_plugin_api.en.adoc") as api_doc_file:
|
||||
with open(DOC_DIR / "weechat_plugin_api.en.adoc",
|
||||
encoding="utf-8") as api_doc_file:
|
||||
api_doc = api_doc_file.read()
|
||||
for match in function_pattern.finditer(api_doc):
|
||||
url = f'https://weechat.org/doc/api/#_{match["function"]}'
|
||||
|
||||
Reference in New Issue
Block a user