Title: PEP8 and other issues · Issue #1 · microsoft/python-sample-vscode-flask-tutorial · GitHub
Open Graph Title: PEP8 and other issues · Issue #1 · microsoft/python-sample-vscode-flask-tutorial
X Title: PEP8 and other issues · Issue #1 · microsoft/python-sample-vscode-flask-tutorial
Description: Please fix them both in the example project here and in the online tutorial. :) PEP8 spaces around the = of keywords args - PEP8 forbids spaces there inconsistent indentation (some function bodies are indented with 8 spaces) local import...
Open Graph Description: Please fix them both in the example project here and in the online tutorial. :) PEP8 spaces around the = of keywords args - PEP8 forbids spaces there inconsistent indentation (some function bodies ...
X Description: Please fix them both in the example project here and in the online tutorial. :) PEP8 spaces around the = of keywords args - PEP8 forbids spaces there inconsistent indentation (some function bodies ...
Opengraph URL: https://github.com/microsoft/python-sample-vscode-flask-tutorial/issues/1
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"PEP8 and other issues","articleBody":"Please fix them both in the example project here and in the online tutorial. :)\r\n\r\n### PEP8\r\n- spaces around the `=` of keywords args - PEP8 forbids spaces there\r\n- inconsistent indentation (some function bodies are indented with 8 spaces)\r\n- local imports for no reason (`datetime` in `hello_there`) - not directly a PEP8 violation but local stdlib imports don't really make sense\r\n\r\n### Flask stuff\r\n- please consider removing the example with the hardcoded HTML. some people WILL think it's OK to do that even if you mention that usually templates are used. also, that hardcoded-html example is vulnerable to XSS.\r\n- `href=\"/static/site.css\"` - use `href=\"{{ url_for('static', filename='site.css')}}\"`\r\n- `message=\"Hello there, \" + name + \"!\",` - usually you would pass just the `name` to the template and then build the message in there. So I would change this, and also do the `strftime` call in the template (ideally someone would use e.g. flask-babel but that's out of the scope of a simple tutorial)\r\n\r\nNote: I'm one of the flask maintainers, and I can assure you that people WILL assume things are good / ok / the way to go when part of a tutorial. I've seen my share of bad practices from code people posted in our IRC channel.","author":{"url":"https://github.com/ThiefMaster","@type":"Person","name":"ThiefMaster"},"datePublished":"2018-07-06T08:43:07.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/1/python-sample-vscode-flask-tutorial/issues/1"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c96e5b31-903d-9521-2545-f33aa581edbd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AFC8:6435C:A44FBA9:E5895A8:6A50D541 |
| html-safe-nonce | 769c72f7473deaa43ddac3d212b1120ca9c445a48f5eaafdb881f01a0f38f9c9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRkM4OjY0MzVDOkE0NEZCQTk6RTU4OTVBODo2QTUwRDU0MSIsInZpc2l0b3JfaWQiOiIxMjEzMTMzMjc5OTc4Mzc4NTYxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d60c1451c802aa09093f25b2556a2aee4a42040e4eafb2214ea1ff7d5b98c15a |
| hovercard-subject-tag | issue:338854952 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/python-sample-vscode-flask-tutorial/1/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4bc672ba48322b25b5de697b5ddabc106978c29a12819da11b8366587f01e93d/microsoft/python-sample-vscode-flask-tutorial/issues/1 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4bc672ba48322b25b5de697b5ddabc106978c29a12819da11b8366587f01e93d/microsoft/python-sample-vscode-flask-tutorial/issues/1 |
| og:image:alt | Please fix them both in the example project here and in the online tutorial. :) PEP8 spaces around the = of keywords args - PEP8 forbids spaces there inconsistent indentation (some function bodies ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ThiefMaster |
| hostname | github.com |
| expected-hostname | github.com |
| None | 72b13e0e8d0319acdd27a145cfe73f4f06c791713d0ac4690e41fb68ad28cac0 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/python-sample-vscode-flask-tutorial git https://github.com/microsoft/python-sample-vscode-flask-tutorial.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 133398807 |
| octolytics-dimension-repository_nwo | microsoft/python-sample-vscode-flask-tutorial |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 133398807 |
| octolytics-dimension-repository_network_root_nwo | microsoft/python-sample-vscode-flask-tutorial |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 5bf72d88d55658ca72495ccb034c76af6c4c2feb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width