Skip to content
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

Adding new features in tox.ini #1457

Merged
merged 1 commit into from
Nov 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ test:
# Format code
.PHONY: format
format:
./scripts/fmt.sh
tox -e fmt
10 changes: 0 additions & 10 deletions scripts/fmt.sh

This file was deleted.

26 changes: 25 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,28 @@ usedevelop = True
deps =
-rrequirements.txt
pytest
commands = pytest tests
commands = pytest tests

[testenv:fmt]
allowlist_externals =
bash
deps =
black
autoflake
pyupgrade
isort
commands =
bash -c 'find tuxemon/ -iname "*.py" -type f | parallel pyupgrade --exit-zero-even-if-changed --py38-plus --keep-runtime-typing'
autoflake -r -i --imports=tuxemon,pygame --ignore-init-module-imports tuxemon/
isort tuxemon tests
black tuxemon tests

[testenv:style]
deps =
black
autoflake
isort
commands =
autoflake -r -i --imports=tuxemon,pygame --ignore-init-module-imports --check-diff --quiet tuxemon/
isort --check --diff --quiet tuxemon tests
black --check --diff --quiet tuxemon tests