Closed Sauravroy34 closed 1 month ago
@Sauravroy34 thanks.
I'm a little hesitant to use extensive pre-commit hooks, in particular when they mess a lot with the code.
Frankly, of all these I would only keep the trailing whitespace one, which is safe in most situations I can think of.
The black
one might make sense because we have the CI test, but I don't want to force the use in all cases, there might be situations where we can relax the requirement, while the pre-commit hook would force black
on the code in all cases.
I would certainly not use the flake8
one, in particular because it might conflict with black
.
@Sauravroy34 thanks.
I'm a little hesitant to use extensive pre-commit hooks, in particular when they mess a lot with the code. Frankly, of all these I would only keep the trailing whitespace one, which is safe in most situations I can think of. The
black
one might make sense because we have the CI test, but I don't want to force the use in all cases, there might be situations where we can relax the requirement, while the pre-commit hook would forceblack
on the code in all cases. I would certainly not use theflake8
one, in particular because it might conflict withblack
.
Sure there might be a problem with using black since there might be a chance that it tweaks some essential logic. and end of files and trailing whitespace are safer
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 78.85%. Comparing base (
c3e6dd3
) to head (a0dc096
).:exclamation: There is a different number of reports uploaded between BASE (c3e6dd3) and HEAD (a0dc096). Click for more details.
HEAD has 15 uploads less than BASE
| Flag | BASE (c3e6dd3) | HEAD (a0dc096) | |------|------|------| ||16|1|
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@matteobachettI I see the concern over here maybe to ensure that pre-commit is run every time a pr pops up (like in astropy and sunpy). So we can have it added in GitHub workflow (pre-commit.ci https://pre-commit.ci/ ) and we can have auto fix as false so it does not fixes automatically
@matteobachetti i have added some docs for pre-commit
Added some pre-commit hooks
fixes #815 so far added for black,whitespace and flake8