{"html_url": "https://github.com/simonw/sqlite-utils/issues/413#issuecomment-1065357081", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/413", "id": 1065357081, "node_id": "IC_kwDOCGYnMM4_gA8Z", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-03-11T18:07:10Z", "updated_at": "2022-03-11T18:07:10Z", "author_association": "OWNER", "body": "I'm really happy with this improvement.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1166587040, "label": "Display autodoc type information more legibly"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/413#issuecomment-1065345515", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/413", "id": 1065345515, "node_id": "IC_kwDOCGYnMM4_f-Hr", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-03-11T17:52:22Z", "updated_at": "2022-03-11T17:52:22Z", "author_association": "OWNER", "body": "Well this is a huge improvement!\r\n\r\nhttps://sqlite-utils.datasette.io/en/latest/reference.html#sqlite_utils.db.Table.insert\r\n\r\n\"image\"\r\n\r\nI'm not crazy about the `extracts=` thing though - I wonder if there's a neat way to customize that to be less verbose?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1166587040, "label": "Display autodoc type information more legibly"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/413#issuecomment-1065249883", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/413", "id": 1065249883, "node_id": "IC_kwDOCGYnMM4_fmxb", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-03-11T16:03:35Z", "updated_at": "2022-03-11T16:03:35Z", "author_association": "OWNER", "body": "Applying this change fixes that:\r\n```diff\r\ndiff --git a/sqlite_utils/db.py b/sqlite_utils/db.py\r\nindex 3bc528f..2a79711 100644\r\n--- a/sqlite_utils/db.py\r\n+++ b/sqlite_utils/db.py\r\n@@ -2293,18 +2293,18 @@ class Table(Queryable):\r\n \"\"\"\r\n Apply conversion function ``fn`` to every value in the specified columns.\r\n \r\n- - ``columns`` - a single column or list of string column names to convert.\r\n- - ``fn`` - a callable that takes a single argument, ``value``, and returns it converted.\r\n- - ``output`` - optional string column name to write the results to (defaults to the input column).\r\n- - ``output_type`` - if the output column needs to be created, this is the type that will be used\r\n+ :param columns: a single column or list of string column names to convert.\r\n+ :param fn: a callable that takes a single argument, ``value``, and returns it converted.\r\n+ :param output: optional string column name to write the results to (defaults to the input column).\r\n+ :param output_type: if the output column needs to be created, this is the type that will be used\r\n for the new column.\r\n- - ``drop`` - boolean, should the original column be dropped once the conversion is complete?\r\n- - ``multi`` - boolean, if ``True`` the return value of ``fn(value)`` will be expected to be a\r\n+ :param drop: boolean, should the original column be dropped once the conversion is complete?\r\n+ :param multi: boolean, if ``True`` the return value of ``fn(value)`` will be expected to be a\r\n dictionary, and new columns will be created for each key of that dictionary.\r\n- - ``where`` - a SQL fragment to use as a ``WHERE`` clause to limit the rows to which the conversion\r\n+ :param where: a SQL fragment to use as a ``WHERE`` clause to limit the rows to which the conversion\r\n is applied, for example ``age > ?`` or ``age > :age``.\r\n- - ``where_args`` - a list of arguments (if using ``?``) or a dictionary (if using ``:age``).\r\n- - ``show_progress`` - boolean, should a progress bar be displayed?\r\n+ :param where_args: a list of arguments (if using ``?``) or a dictionary (if using ``:age``).\r\n+ :param show_progress: boolean, should a progress bar be displayed?\r\n \r\n See :ref:`python_api_convert`.\r\n \"\"\"\r\n```\r\n\"image\"\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1166587040, "label": "Display autodoc type information more legibly"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/413#issuecomment-1065247619", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/413", "id": 1065247619, "node_id": "IC_kwDOCGYnMM4_fmOD", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-03-11T16:01:20Z", "updated_at": "2022-03-11T16:01:20Z", "author_association": "OWNER", "body": "Definitely an improvement!\r\n\r\n\"image\"\r\n\r\nIt does highlight that I'm not currently using the `:param XXX: description` syntax though, which should move my descriptions of each parameter into that generated list.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1166587040, "label": "Display autodoc type information more legibly"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/413#issuecomment-1065245831", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/413", "id": 1065245831, "node_id": "IC_kwDOCGYnMM4_flyH", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-03-11T15:59:14Z", "updated_at": "2022-03-11T15:59:14Z", "author_association": "OWNER", "body": "Hint from https://twitter.com/AdamChainz/status/1502311047612575745\r\n\r\n> Try:\r\n> \r\n> `autodoc_typehints = 'description'`\r\n> \r\n> For a list-of-arguments format\r\n> \r\n> https://sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc_typehints", "reactions": "{\"total_count\": 1, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 1, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1166587040, "label": "Display autodoc type information more legibly"}, "performed_via_github_app": null}