提交 f641f32d authored 作者: Brandon T. Willard's avatar Brandon T. Willard

Add isort to settings, requirements, and Makefile

上级 7b02965d
...@@ -42,7 +42,8 @@ check-docstyle: ...@@ -42,7 +42,8 @@ check-docstyle:
check-format: check-format:
@printf "Checking code format...\n" @printf "Checking code format...\n"
black -t py36 --check ${PROJECT_DIR} tests/ setup.py conftest.py black -t py36 --check ${PROJECT_DIR} tests/ setup.py conftest.py; \
isort --check ${PROJECT_DIR} tests/ setup.py conftest.py;
@printf "\033[1;34mFormatting passes!\033[0m\n\n" @printf "\033[1;34mFormatting passes!\033[0m\n\n"
check-style: check-style:
...@@ -51,7 +52,8 @@ check-style: ...@@ -51,7 +52,8 @@ check-style:
@printf "\033[1;34mCode style passes!\033[0m\n\n" @printf "\033[1;34mCode style passes!\033[0m\n\n"
format: # Format code in-place using black. format: # Format code in-place using black.
black ${PROJECT_DIR} tests/ setup.py conftest.py black ${PROJECT_DIR} tests/ setup.py conftest.py; \
isort ${PROJECT_DIR} tests/ setup.py conftest.py;
test: # Test code using pytest. test: # Test code using pytest.
pytest -v tests/ ${PROJECT_DIR} --cov=${PROJECT_DIR} --cov-report=xml --html=testing-report.html --self-contained-html pytest -v tests/ ${PROJECT_DIR} --cov=${PROJECT_DIR} --cov-report=xml --html=testing-report.html --self-contained-html
...@@ -65,6 +67,6 @@ pypi: ...@@ -65,6 +67,6 @@ pypi:
${PYTHON} setup.py sdist bdist_wheel; \ ${PYTHON} setup.py sdist bdist_wheel; \
twine upload --skip-existing dist/*; twine upload --skip-existing dist/*;
lint: check-docstyle check-format check-style lint: check-format check-style check-docstyle
check: lint test coverage check: lint test coverage
...@@ -14,3 +14,4 @@ jax; python_version > '3.6' ...@@ -14,3 +14,4 @@ jax; python_version > '3.6'
jaxlib; python_version > '3.6' jaxlib; python_version > '3.6'
diff-cover diff-cover
pre-commit pre-commit
isort
...@@ -37,4 +37,12 @@ testpaths = tests/ ...@@ -37,4 +37,12 @@ testpaths = tests/
max-line-length = 88 max-line-length = 88
[pylint.messages_control] [pylint.messages_control]
disable = C0330, C0326 disable = C0330, C0326
\ No newline at end of file
[isort]
profile = black
lines_after_imports = 2
lines_between_sections = 1
honor_noqa = True
skip_gitignore = True
skip = theano/version.py
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论