diff --git a/.gitignore b/.gitignore index 8821e6f..befe6d5 100644 --- a/.gitignore +++ b/.gitignore @@ -163,3 +163,6 @@ cython_debug/ .DS_Store .zed + +# Vscode +.vscode diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6ff65fb..360298c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,10 @@ repos: - - repo: https://github.com/rtts/djhtml - rev: '3.0.6' + - repo: local hooks: - - id: djhtml - entry: djhtml --tabwidth 2 templates + - id: format + name: format + stages: [commit] + entry: pdm + args: ['format'] + language: system + pass_filenames: false diff --git a/pyproject.toml b/pyproject.toml index 9553464..3c2e5cc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,8 @@ plugins = ["pdm-autoexport"] dev = "flask --app app run --debug" test = "pytest -n auto" run_black = "black ." -djhtml = "djhtml --tabwidth 2 templates" +djhtml.cmd = "djhtml --tabwidth 2 templates" +djhtml.env = {PYTHONUTF8 = "1"} format = {composite = ["run_black", "djhtml"]} [tool.pdm.dev-dependencies]