Define the standard to follow in python
Closed this issue · 4 comments
Como sugirio @tomvik hay que definir para los scripts de python que desarrollamos en @Home. Links utiles:
https://dev.to/j0nimost/setting-up-pep8-and-pylint-on-vs-code-34h
http://python.org/dev/peps/pep-0008/#variable-annotations
https://google.github.io/styleguide/pyguide.html#319-type-annotations
Do you think it's necessary to create a venv for this? It seems like the setup is straight forward:
pip2 install pep8
pip2 install pylint
pip2 install autopep8
And then on the .vscode/settings.json
to add the following lines:
"python.pythonPath": "/your/own/python/directory",
"python.formatting.provider": "autopep8",
"python.linting.pylintEnabled": true
So the above is only for normal linting and formatting. Now, the good thing is pyright:
Simply install the vscode extension, and add the following lines to the .vscode/settings.json
:
"python.analysis.useLibraryCodeForTypes": true,
"python.analysis.typeCheckingMode":"strict"
Looks great to me:) , Can you add a section to the wiki with this info? I'll set it up in my pc and let you know how it goes
Update:
Easy and fast to install, works great one note to add in the docs:
If you wish to know the install location of python in ubuntu (pythonPath) just type which python
in the console.
Done.
The changes were:
- Added a wiki page: Coding
- Modified the main wiki page to include the link to the Coding page
- Modified the sidebar to include the link to the Coding page
Please confirm that everything's good to close the issue @paulvazbad Thanks!
Awesome, thanks! Closing this now