Open huan opened 5 years ago
I am using flake8 for now. Below is my config refer to the pytorch python linting.
Install
pip3 install flake8 flake8-mypy flake8-bugbear flake8-comprehensions flake8-executable flake8-pyi mccabe pycodestyle pyflakes
.flake8
file
[flake8]
select = B,C,E,F,P,T4,W,B9
max-line-length = 120
# C408 ignored because we like the dict keyword argument syntax
# E501 is not flexible enough, we're using B950 instead
ignore =
E203,E305,E402,E501,E721,E741,F403,F405,F821,F841,F999,W503,W504,C408,E302,W291,E303,
# these ignores are from flake8-bugbear; please fix!
B007,B008,
# these ignores are from flake8-comprehensions; please fix!
C400,C401,C402,C403,C404,C405,C407,C411,
per-file-ignores = __init__.py: F401
exclude = docs/src,venv,third_party,caffe2,scripts,docs/caffe2,torch/lib/include,torch/lib/tmp_install,build,torch/include,*.pyi,.git
I tried to add this repo to Travis CI, sadly and found that I don't have enough rights to enable this repo on Travis. Maybe it is great to enable the CI by the owner, and we just modify the .travis.yaml
to configure the CI. And also it will be appreciated to give a hint on how to check the availability to the repo, which does not belong to me.
I did my efforts under the following steps:
How to check the availability to the CI
, but no useful information get.Yes, it seems that only the repo owner can enable it.
I'll try to make it work later, please get your configure file ready to go!
Okay I will get it ready recently.
I believe it's ready to go now:
Awesome, so happy to see that, the file will be ready to go recently.
It is very important to keep the coding style of the whole codebase to be consistent through all the team members because it will help us to read the code more easily.
To be added to the CI.