-
Notifications
You must be signed in to change notification settings - Fork 7
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
Adopt style guide + checks #13
Comments
@MaJuRG I think it would be best to run black before committing code or (if possible) have some way to run black automatically on code that we push to a repo. |
For
That can be handled by using a git pre-commit hook alright. We can add that too in the skeleton .
This can be done via github action or even as a part of travis. Having said that I don't think it would be a good idea to adopt black 100%. Rather incremental adoption seems a better/safer approach, especially in the context of huge codebase like scancode. For this we could run black only on the files which are changed. Do note that black has default line limit of 88 characters, which might need to be overridden with some other limit. Unrelated : |
@sbs2001 that makes a lot of sense. Using black in a pre-commit hook and addition to Travis (like with some reasonable changes like the character limit as you mentioned) and then incremental addition (maybe adding tickets to fully adopt the standard) seems alright. Anyway running on changed files is reasonable since it's better than to run on all files. And adding this as a template repo also makes sense, for any new projects. |
Interesting idea about making this repo a GH "template". As long as nothing strange happens to this repo on the GH side once enabled, we can probably adopt this feature. |
w.r.t. the I think the real question is do we want to use As far as the incremental adoption, remember that we are just discussing in the |
@MaJuRG how about using black for both ? |
@sbs2001 Good point thanks :) This fits nicely. |
VulnerableCode finally uses black for both formatting and checking :) |
1 similar comment
VulnerableCode finally uses black for both formatting and checking :) |
@pombredanne @JonoYang @AyanSinhaMahapatra @sbs2001
We need to make a decision as to what our python style approach should be. We have in the past a mix of PEP8 and some using
black
. I am not opposed to any method, we just need to decide on something.Thoughts?
The text was updated successfully, but these errors were encountered: