@@ -11,6 +11,7 @@ src-dir := 'src' / app-id
11
11
test-dir := ' tests'
12
12
docs-dir := ' docs'
13
13
14
+ python-ver := ' py312'
14
15
rtd-build-api-url := " https://readthedocs.org/api/v3/projects/{{ app-id}} /versions/latest/builds/"
15
16
16
17
# Show this help and exit.
@@ -33,17 +34,17 @@ clean:
33
34
# Set local development environment with nix and direnv.
34
35
dev :
35
36
#!/usr/bin/env bash
36
- if command -v nix-env > / dev/ null && command -v direnv > / dev/ null; then \
37
+ if command -v nix-env > / dev/ null && command -v direnv > / dev/ null; then
37
38
printf " Configuring a local dev environment and setting up git pre-commit hooks...\n " >&2 \
38
39
&& direnv allow . > / dev/ null \
39
40
&& DIRENV_LOG_FORMAT=" " direnv exec {{ justfile_directory ()}} pre-commit install \
40
- && printf " Done.\n " >&2 ; \
41
- elif command -v nix-env > / dev/ null; then \
42
- printf " Error: direnv seems to be unconfigured or missing\n " >&2 && exit 1 ; \
43
- elif command -v direnv > / dev/ null; then \
44
- printf " Error: nix seems to be unconfigured or missing\n " >&2 && exit 1 ; \
45
- else \
46
- printf " Error: both direnv and nix seem to be unconfigured and/or missing" >&2 && exit 1 ; \
41
+ && printf " Done.\n " >&2
42
+ elif command -v nix-env > / dev/ null; then
43
+ printf " Error: direnv seems to be unconfigured or missing\n " >&2 && exit 1
44
+ elif command -v direnv > / dev/ null; then
45
+ printf " Error: nix seems to be unconfigured or missing\n " >&2 && exit 1
46
+ else
47
+ printf " Error: both direnv and nix seem to be unconfigured and/or missing" >&2 && exit 1
47
48
fi
48
49
49
50
# Reset local development environment.
@@ -69,7 +70,7 @@ docs-html-serve:
69
70
# Reorder imports with ruff then apply black.
70
71
fmt :
71
72
ruff check --fix
72
- black -t py3 12 {{ src-dir}} {{ test-dir}}
73
+ black -t {{ python-ver }} {{ src-dir}} {{ test-dir}}
73
74
74
75
# Build a docker image and load it into a running daemon.
75
76
img :
@@ -86,7 +87,7 @@ lint-types:
86
87
# Lint style conventions.
87
88
lint-style :
88
89
ruff check
89
- black -t py3 12 --check {{ src-dir}} {{ test-dir}}
90
+ black -t {{ python-ver }} --check {{ src-dir}} {{ test-dir}}
90
91
91
92
# Lint various metrics.
92
93
lint-metrics :
0 commit comments