Resolve "Linting of OpenMP pragmas"
Closes #339 (closed)
Options:
- Skip all
_kernels.py
files - Add exception E265 (Block comments should have one space before the pound sign (#) and the comment itself.)
- Add
# noqa
to all omp lines to ignore it in the linter (This is of course the worst option)
I don't like option 1 since 1) We actually do want to format the kernel files, 2) not all kernel files are/will be consistently named, 3) there may be OMP tags in other files too.
I don't like option 3 since I don't think we should rely on using code comments that are specific to autopep8
and this solution is very prone to bugs in the future due to forgetting to add the tag.
I don't really like option 2 either, since I believe there should be a space after #
for comments but I implemented it anyway and ran struphy format
on the following kernel files:
src/struphy/bsplines/bsplines_kernels.py
src/struphy/eigenvalue_solvers/kernels_2d.py
src/struphy/pic/accumulation/accum_kernels.py
src/struphy/pic/pushing/pusher_kernels.py
Please check that they are correct
Edited by Max Lindqvist