home / github / issue_comments

Menu
  • GraphQL API

issue_comments: 864207841

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions issue performed_via_github_app
https://github.com/simonw/sqlite-utils/issues/279#issuecomment-864207841 https://api.github.com/repos/simonw/sqlite-utils/issues/279 864207841 MDEyOklzc3VlQ29tbWVudDg2NDIwNzg0MQ== 9599 2021-06-18T18:28:40Z 2021-06-18T18:28:46Z OWNER ```python def detect_format(fp): # ... return "csv", fp, dialect # or return "json", fp, parsed_data # or return "json-nl", fp, docs ``` The mixed return types here are ugly. In all of these cases what we really want is to return a generator of `{...}` objects. So maybe it returns that instead. ```python def filepointer_to_documents(fp): # ... yield from documents ``` I can refactor `sqlite-utils insert` to use this new code too. {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} 924990677  
Powered by Datasette · Queries took 0.977ms