diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..d953e4c --- /dev/null +++ b/.flake8 @@ -0,0 +1,4 @@ +[flake8] +ignore = E261, E501, W293 +max-line-length = 79 +exclude = __init__.py, build \ No newline at end of file diff --git a/.isort.cfg b/.isort.cfg new file mode 100644 index 0000000..8039326 --- /dev/null +++ b/.isort.cfg @@ -0,0 +1,10 @@ +[isort] +line_length=79 +multi_line_output=3 +length_sort=true +known_standard_library=numpy,setuptools +known_myself=torchreid +known_third_party=matplotlib,cv2,torch,torchvision,PIL,yacs +no_lines_before=STDLIB,THIRDPARTY +sections=FUTURE,STDLIB,THIRDPARTY,myself,FIRSTPARTY,LOCALFOLDER +default_section=FIRSTPARTY \ No newline at end of file diff --git a/.style.yapf b/.style.yapf new file mode 100644 index 0000000..3a53db5 --- /dev/null +++ b/.style.yapf @@ -0,0 +1,9 @@ +[style] +BASED_ON_STYLE = pep8 +BLANK_LINE_BEFORE_NESTED_CLASS_OR_DEF = true +BLANK_LINE_BEFORE_MODULE_DOCSTRING = true +BLANK_LINE_BEFORE_CLASS_DOCSTRING = true +SPLIT_BEFORE_EXPRESSION_AFTER_OPENING_PAREN = true +DEDENT_CLOSING_BRACKETS = true +SPACES_BEFORE_COMMENT = 1 +ARITHMETIC_PRECEDENCE_INDICATION = true \ No newline at end of file diff --git a/linter.sh b/linter.sh new file mode 100644 index 0000000..e9eeca4 --- /dev/null +++ b/linter.sh @@ -0,0 +1,3 @@ +isort -y -sp . + +yapf -i -r -vv . -e build \ No newline at end of file