From eb6d2d778b892b43f930702373632aef6b118204 Mon Sep 17 00:00:00 2001 From: Yury Selivanov Date: Fri, 11 Oct 2024 11:47:10 -0700 Subject: [PATCH] Fix things --- docs/stdlib/index.rst | 1 + docs/stdlib/net.rst | 25 ++++++++----------------- edb/tools/docs/eql.py | 6 ++++-- 3 files changed, 13 insertions(+), 19 deletions(-) diff --git a/docs/stdlib/index.rst b/docs/stdlib/index.rst index f37b4d9462ba..58cb4509714f 100644 --- a/docs/stdlib/index.rst +++ b/docs/stdlib/index.rst @@ -30,6 +30,7 @@ Standard Library objects abstract constraints + net fts sys cfg diff --git a/docs/stdlib/net.rst b/docs/stdlib/net.rst index cdb9a59fef35..d17885299708 100644 --- a/docs/stdlib/net.rst +++ b/docs/stdlib/net.rst @@ -120,30 +120,21 @@ The ``net::http`` submodule provides types and functions for making HTTP request .. eql:function:: net::http::schedule_request( \ url: str, \ body: optional bytes = {}, \ - method: optional net::http::Method = net::http::Method.GET, \ + method: optional net::http::Method = net::http::Method.`GET`, \ headers: optional array> = {} \ ) -> net::http::ScheduledRequest Schedules an HTTP request. - :param url: - The URL to send the request to. - :paramtype url: str + Parameters: - :param body: - The body of the request (optional). - :paramtype body: bytes + * ``url``: The URL to send the request to. + * ``body``: The body of the request (optional). + * ``method``: The HTTP method to use (optional, defaults to GET). + * ``headers``: The headers to include in the request (optional). - :param method: - The HTTP method to use (optional, defaults to GET). - :paramtype method: net::http::Method - - :param headers: - The headers to include in the request (optional). - :paramtype headers: array> - - :return: A object representing the scheduled request. - :returntype: net::http::ScheduledRequest + Returns ``net::http::ScheduledRequest`` object representing + the scheduled request. Example: diff --git a/edb/tools/docs/eql.py b/edb/tools/docs/eql.py index 9d7faacc7008..6a8d339243ba 100644 --- a/edb/tools/docs/eql.py +++ b/edb/tools/docs/eql.py @@ -594,7 +594,7 @@ class EQLTypeDirective(BaseEQLDirective): def handle_signature(self, sig, signode): if '::' in sig: - mod, name = sig.strip().split('::') + mod, name = sig.strip().rsplit('::', 1) else: name = sig.strip() mod = 'std' @@ -772,7 +772,9 @@ def handle_signature(self, sig, signode): f'create function {sig} using SQL function "xxx";')[0] except Exception as ex: raise self.error( - f'could not parse function signature {sig!r}') from ex + f'could not parse function signature {sig!r}: ' + f'{ex.__class__.__name__}({ex.args[0]!r})' + ) from ex if (not isinstance(astnode, ql_ast.CreateFunction) or not isinstance(astnode.name, ql_ast.ObjectRef)):