{"action":"created","issue":{"url":"https://api.github.com/repos/PennyDreadfulMTG/Penny-Dreadful-Tools/issues/407","repository_url":"https://api.github.com/repos/PennyDreadfulMTG/Penny-Dreadful-Tools","labels_url":"https://api.github.com/repos/PennyDreadfulMTG/Penny-Dreadful-Tools/issues/407/labels{/name}","comments_url":"https://api.github.com/repos/PennyDreadfulMTG/Penny-Dreadful-Tools/issues/407/comments","events_url":"https://api.github.com/repos/PennyDreadfulMTG/Penny-Dreadful-Tools/issues/407/events","html_url":"https://github.com/PennyDreadfulMTG/Penny-Dreadful-Tools/issues/407","id":186134756,"number":407,"title":"Standardize imports","user":{"login":"bakert","id":1541,"avatar_url":"https://avatars.githubusercontent.com/u/1541?v=3","gravatar_id":"","url":"https://api.github.com/users/bakert","html_url":"https://github.com/bakert","followers_url":"https://api.github.com/users/bakert/followers","following_url":"https://api.github.com/users/bakert/following{/other_user}","gists_url":"https://api.github.com/users/bakert/gists{/gist_id}","starred_url":"https://api.github.com/users/bakert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bakert/subscriptions","organizations_url":"https://api.github.com/users/bakert/orgs","repos_url":"https://api.github.com/users/bakert/repos","events_url":"https://api.github.com/users/bakert/events{/privacy}","received_events_url":"https://api.github.com/users/bakert/received_events","type":"User","site_admin":false},"labels":[{"id":469810795,"url":"https://api.github.com/repos/PennyDreadfulMTG/Penny-Dreadful-Tools/labels/monolith","name":"monolith","color":"e99695","default":false},{"id":450464789,"url":"https://api.github.com/repos/PennyDreadfulMTG/Penny-Dreadful-Tools/labels/refactor","name":"refactor","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-10-30T12:57:52Z","updated_at":"2016-10-31T02:09:50Z","closed_at":null,"body":"from dateutil import tz\n\nor \n\nimport dateutil\n\nAnd many other examples.\n\nLet's have a standard.\n"},"comment":{"url":"https://api.github.com/repos/PennyDreadfulMTG/Penny-Dreadful-Tools/issues/comments/257199619","html_url":"https://github.com/PennyDreadfulMTG/Penny-Dreadful-Tools/issues/407#issuecomment-257199619","issue_url":"https://api.github.com/repos/PennyDreadfulMTG/Penny-Dreadful-Tools/issues/407","id":257199619,"user":{"login":"bakert","id":1541,"avatar_url":"https://avatars.githubusercontent.com/u/1541?v=3","gravatar_id":"","url":"https://api.github.com/users/bakert","html_url":"https://github.com/bakert","followers_url":"https://api.github.com/users/bakert/followers","following_url":"https://api.github.com/users/bakert/following{/other_user}","gists_url":"https://api.github.com/users/bakert/gists{/gist_id}","starred_url":"https://api.github.com/users/bakert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bakert/subscriptions","organizations_url":"https://api.github.com/users/bakert/orgs","repos_url":"https://api.github.com/users/bakert/repos","events_url":"https://api.github.com/users/bakert/events{/privacy}","received_events_url":"https://api.github.com/users/bakert/received_events","type":"User","site_admin":false},"created_at":"2016-10-31T02:09:50Z","updated_at":"2016-10-31T02:09:50Z","body":"I think by common usage we've decided that all of these are ok:\r\n\r\nimport pythonmodule [re, time, sys, apsw, ...]\r\nimport thirdparylib [pkg_resources]\r\nfrom thirdpartylib import function [flask.url_for]\r\nfrom dir.subdir import module\r\n\r\nI think we've also decided that lists coming from the same module are ok which clears:\r\n\r\nfrom thirdaypartylib import one, two [discordbot.command, discordbot.emjoi]\r\nfrom dir import long, list, of, modules\r\nfrom dir.subdir import function1, function2 [shared.database.sqlescape, shared.database.sqllikeescape]\r\nfrom thirdaypartylib import one, two [discordbot.command, discordbot.emjoi]\r\n\r\nI'm also certain that I want to allow:\r\n\r\nfrom .subdir import Class [Views in init.py]\r\n\r\nbecause I can't be saying `views.cards.Cards` and `views.deck.Deck` all the time and the mustache renderer wants classes.\r\n\r\nFor the same reason I want to allow:\r\n\r\nfrom thirdpartylib import Class [munch.Munch, bs4.BeatitfulSoup]\r\n\r\nwhich I suppose implicitly allows:\r\n\r\nfrom dir.subdir import Long, List, Of, Classes [Views, Tokens]\r\nfrom thirdpartylib import Class, module, module [Flask, request, send_from_directory]\r\nfrom dir.subdir import function1, function2 [shared.database.sqlescape, shared.database.sqllikeescape]\r\n\r\nI'm less clear on:\r\n\r\nfrom pythonmodule import Class [typing.List]\r\nfrom dir.subdir import thing as thing2, thing3 as thing4, thing5, thing6 as thing7 [main.py imports that conflict function names]\r\nfrom dir.module import function [db]\r\n\r\nAlthough in the last case I really want shorthand for the database that's not unwieldy.\r\n\r\nI guess I'm on the verge of concluding that it's all case-by-case and we should just not do anything too terrible."}}
{"actor":{"display_login":"bakert"}}