summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJensDiemer <git@jensdiemer.de>2020-10-17 20:02:26 +0200
committerJensDiemer <git@jensdiemer.de>2020-10-17 20:02:26 +0200
commit09a7a07a9eda8369e62298e1a251d6c377d1b630 (patch)
tree588b69aae98867fe837302df92fe66f9178d6038
parent830c5f57e448152954fb15de5e83f09bd7136c47 (diff)
downloadcreole-09a7a07a9eda8369e62298e1a251d6c377d1b630.tar.gz
update "make lint" and "make fix-code-style" and add pyupgrade
-rw-r--r--Makefile13
-rw-r--r--pyproject.toml1
2 files changed, 8 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 0c92a86..fc38d47 100644
--- a/Makefile
+++ b/Makefile
@@ -32,14 +32,15 @@ update: check-poetry ## Update the dependencies as according to the pyproject.to
poetry update
lint: ## Run code formatters and linter
- poetry run flynt --fail-on-change --line_length=${MAX_LINE_LENGTH} creole
- poetry run isort --check-only --recursive creole
- poetry run flake8 creole
+ poetry run flynt --fail-on-change --line_length=${MAX_LINE_LENGTH} .
+ poetry run isort --check-only .
+ poetry run flake8 .
fix-code-style: ## Fix code formatting
- poetry run flynt --line_length=${MAX_LINE_LENGTH} creole
- poetry run isort --apply --recursive creole
- poetry run autopep8 --ignore-local-config --max-line-length=${MAX_LINE_LENGTH} --aggressive --aggressive --in-place --recursive creole
+ poetry run flynt --line_length=${MAX_LINE_LENGTH} .
+ poetry run pyupgrade --exit-zero-even-if-changed --py3-plus --py36-plus --py37-plus `find . -name "*.py" -type f -not -path "./.tox/*"`
+ poetry run isort .
+ poetry run autopep8 --aggressive --aggressive --in-place --recursive .
tox-listenvs: check-poetry ## List all tox test environments
poetry run tox --listenvs
diff --git a/pyproject.toml b/pyproject.toml
index d5cd401..fce9de7 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -49,6 +49,7 @@ isort = "*"
flake8 = "*"
flynt = "*"
autopep8 = "*"
+pyupgrade = "*"
[tool.poetry.scripts]
creole2html = "creole.cmdline:cli_creole2html"