Flask-GoogleMaps
Flask-GoogleMaps copied to clipboard
Code style standardization
Create standard to define new PRs and commit.
We have many case like that: https://github.com/flask-extensions/Flask-GoogleMaps/blob/f9e55917a3cbb98199e5a0cc4bc7a4745b68dd46/flask_googlemaps/init.py#L223-L234
What the form is more correctly or preferable for this project?
I think the best way is to use the Black and respect PEP-8 using black -l 80
Maybe add -s
flag to not normalize strings.
Another case is related to docstring standards: https://github.com/flask-extensions/Flask-GoogleMaps/blob/f9e55917a3cbb98199e5a0cc4bc7a4745b68dd46/flask_googlemaps/init.py#L46
In some docstrings we have parameters explanations in others not. In another cases we has things that can be replaced by type annotations https://github.com/flask-extensions/Flask-GoogleMaps/blob/f9e55917a3cbb98199e5a0cc4bc7a4745b68dd46/flask_googlemaps/init.py#L421-L428
We can test it in a CI using tox, or not, is only a sugestion
For the dev/env vscode, we can create some settings.json rules like:
${HOME}/.config/Code\ -\ Insiders/User/settings.json
{
"autoDocstring.docstringFormat": "google",
"autoDocstring.includeName": true,
"autoDocstring.includeExtendedSummary": true,
"autoDocstring.startOnNewLine": false,
"python.linting.flake8Enabled": true,
"python.linting.pydocstyleEnabled": true,
"python.linting.pylintEnabled": false,
"python.linting.pydocstyleArgs": [
"--convention=google",
"--ignore=D4"
]
}
@dunossauro I think that the use o Blak to create a standard for the new commits a great idea. Can you do it and send us a PR?
You can work from this brach. I say it because I think to use a Feature Branch to control the flow of the work.
@dunossauro after standardizes the code with the Black, can you change the README with this code:
[](https://github.com/psf/black)