-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Homogenize annotation and typing syntax #53
Comments
I support this! The linters I use are: The latest release of Lintersmypy is a static type helper, for example giving an error if you write pydocstyle makes sure docstrings are more or less correctly formatted. It doesn't enforce e.g. sphinx formatting, so maybe there's another tool to add here? prospector is a convenience linter that implements three linters in one: pylint is a general-purpose linter for common issues. For example, it enforces the correct use of "snake_case" and "CamelCase" naming conventions. pep8 warns you about line lengths, weird whitespace, wrong indentation, correct line spacing between functions, etc. McCabe complexity makes sure that functions and classes are not overly complex, e.g. if a function has more than X defined variables, maybe it should be split in two. I am particularly bad at this.. Formattersisort sorts imports alphabetically and divides them in three categories: "builtin imports", "third party imports", "local imports" (if the import is a directory in your cwd for example). autopep8 helps with automatically conforming your code to the pep8 standard. I've set the Should we agree on a combination of linters and formatters? I know some repos have commit/push/merge hooks that format the code. Since we are only ~three active developers right now, maybe this is overly complex at the time being, but we could consider something similar in the future. |
Maybe the issue should be renamed "Write a contribution guideline" with all this info ;-) |
This is amazing @erikmannerfelt ! 😳
I agree that this is still early. It would be great for us three to try to abide by those standards, which are really useful even for us when coding (in PyCharm, I simply point my mouse at a function I'm using and I get all input/output types in detail, it's truly amazing), and to make everything homogeneous. I guess we should aim at switching the annotations of geoutils too, for consistency? It's good practice too ;) |
Right now it's still a mix. I'm up for homogenizing for in-function annotations everywhere (Erik's good at it, but I'm slowly learning ;D)
The text was updated successfully, but these errors were encountered: