-
-
Notifications
You must be signed in to change notification settings - Fork 182
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
Add flake8
and isort
checks on python files in cpp
folder
#2838
Conversation
cpp/.flake8
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we move this file to the top level directory and remove python/.flake8
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
python/.flake8
is not there yet, it will be once #2707 is merged.
@@ -69,13 +69,21 @@ jobs: | |||
run: pip3 install matplotlib | |||
- name: Flake8 checks | |||
run: | | |||
cd cpp/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we just do python3 -m flake8 cpp/
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It depends: do you want cpp/doc/source/conf.py
to be tested too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a vague recollection that the order of the imports in cpp/doc/source/conf.py
is important.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if that is a yes or a no to my question 😄
- if you want
cpp/doc/source/conf.py
to be tested, then we could move topython3 -m flake8 cpp/
, but then it stands to reason thatpython/doc/source/conf.py
should be tested too, and thus we should try to move topython3 -m flake8 python/
too. - if you do not want
cpp/doc/source/conf.py
to be tested, then we cannot just dopython3 -m flake8 cpp/
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Answer is do not use isort
on cpp/doc/source/conf.py
without testing.
01919e9
to
6b2edf6
Compare
There are some python files in the
cpp
folder, but they were not passed throughflake8
orisort
on CI. For the time being there is no point in runningmypy
on them becauseufl
is not typed.