-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #475 from dgasmith/lint
Lint Black, iSort, and Autoflake
- Loading branch information
Showing
112 changed files
with
4,741 additions
and
4,395 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
.DEFAULT_GOAL := all | ||
isort = isort -rc qcfractal | ||
black = black qcfractal | ||
autoflake = autoflake -ir --remove-all-unused-imports --ignore-init-module-imports --remove-unused-variables --exclude="*/tests/*,*/versions/*,*/models/*" qcfractal | ||
|
||
.PHONY: install | ||
install: | ||
pip install -e . | ||
|
||
.PHONY: format | ||
format: | ||
$(autoflake) | ||
$(isort) | ||
$(black) | ||
|
||
.PHONY: lint | ||
lint: | ||
$(isort) --check-only | ||
$(black) --check | ||
|
||
.PHONY: check-dist | ||
check-dist: | ||
python setup.py check -ms | ||
python setup.py sdist | ||
twine check dist/* | ||
|
||
.PHONY: mypy | ||
mypy: | ||
mypy qcfractal | ||
|
||
.PHONY: test | ||
test: | ||
pytest -v --cov=qcfractal/ | ||
|
||
.PHONY: clean | ||
clean: | ||
rm -rf `find . -name __pycache__` | ||
rm -f `find . -type f -name '*.py[co]' ` | ||
rm -f `find . -type f -name '*~' ` | ||
rm -f `find . -type f -name '.*~' ` | ||
rm -rf .cache | ||
rm -rf .pytest_cache | ||
rm -rf .mypy_cache | ||
rm -rf htmlcov | ||
rm -rf *.egg-info | ||
rm -f .coverage | ||
rm -f .coverage.* | ||
rm -rf build | ||
rm -rf dist | ||
rm -f qcfractal/*.c qcfractal/*.so | ||
python setup.py clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[tool.black] | ||
line-length = 120 | ||
target-version = ['py37'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.