Skip to content

Commit d20401a

Browse files
committed
fix: make pre-commit happy
1 parent 3b7f03b commit d20401a

File tree

2 files changed

+72
-77
lines changed

2 files changed

+72
-77
lines changed

Taskfile.yml

Lines changed: 72 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,79 @@
1-
21
# https://taskfile.dev
32

43
version: "3"
54

65
env:
7-
LOCALES: ['de'] # list your included locales here, e.g. ["de", "fr"]
8-
TRANSLATIONS: "octoprint_file_check/translations" # translations folder, do not touch
9-
6+
LOCALES: ["de"] # list your included locales here, e.g. ["de", "fr"]
7+
TRANSLATIONS: "octoprint_file_check/translations" # translations folder, do not touch
108

119
tasks:
12-
install:
13-
desc: Installs the plugin into the current venv
14-
cmds:
15-
- "python -m pip install -e .[develop]"
16-
17-
### Build related
18-
19-
build:
20-
desc: Builds sdist & wheel
21-
cmds:
22-
- python -m build --sdist --wheel
23-
24-
build-sdist:
25-
desc: Builds sdist
26-
cmds:
27-
- python -m build --sdist
28-
29-
build-wheel:
30-
desc: Builds wheel
31-
cmds:
32-
- python -m build --wheel
33-
34-
### Translation related
35-
36-
babel-new:
37-
desc: Create a new translation for a locale
38-
cmds:
39-
- task: babel-extract
40-
- |
41-
pybabel init --input-file=translations/messages.pot --output-dir=translations --locale="{{ .CLI_ARGS }}"
42-
43-
babel-extract:
44-
desc: Update pot file from source
45-
cmds:
46-
- pybabel extract --mapping-file=babel.cfg --output-file=translations/messages.pot --msgid-bugs-address=i18n@octoprint.org --copyright-holder="The OctoPrint Project" .
47-
48-
babel-update:
49-
desc: Update translation files from pot file
50-
cmds:
51-
- for:
52-
var: LOCALES
53-
cmd: pybabel update --input-file=translations/messages.pot --output-dir=translations --locale={{ .ITEM }}
54-
55-
babel-refresh:
56-
desc: Update translation files from source
57-
cmds:
58-
- task: babel-extract
59-
- task: babel-update
60-
61-
babel-compile:
62-
desc: Compile translation files
63-
cmds:
64-
- pybabel compile --directory=translations
65-
66-
babel-bundle:
67-
desc: Bundle translations
68-
preconditions:
69-
- test -d {{ .TRANSLATIONS }}
70-
cmds:
71-
- for:
72-
var: LOCALES
73-
cmd: |
74-
locale="{{ .ITEM }}"
75-
source="translations/${locale}"
76-
target="{{ .TRANSLATIONS }}/${locale}"
77-
78-
[ ! -d "${target}" ] || rm -r "${target}"
79-
80-
echo "Copying translations for locale ${locale} from ${source} to ${target}..."
81-
cp -r "${source}" "${target}"
82-
10+
install:
11+
desc: Installs the plugin into the current venv
12+
cmds:
13+
- "python -m pip install -e .[develop]"
14+
15+
### Build related
16+
17+
build:
18+
desc: Builds sdist & wheel
19+
cmds:
20+
- python -m build --sdist --wheel
21+
22+
build-sdist:
23+
desc: Builds sdist
24+
cmds:
25+
- python -m build --sdist
26+
27+
build-wheel:
28+
desc: Builds wheel
29+
cmds:
30+
- python -m build --wheel
31+
32+
### Translation related
33+
34+
babel-new:
35+
desc: Create a new translation for a locale
36+
cmds:
37+
- task: babel-extract
38+
- |
39+
pybabel init --input-file=translations/messages.pot --output-dir=translations --locale="{{ .CLI_ARGS }}"
40+
41+
babel-extract:
42+
desc: Update pot file from source
43+
cmds:
44+
- pybabel extract --mapping-file=babel.cfg --output-file=translations/messages.pot --msgid-bugs-address=i18n@octoprint.org --copyright-holder="The OctoPrint Project" .
45+
46+
babel-update:
47+
desc: Update translation files from pot file
48+
cmds:
49+
- for:
50+
var: LOCALES
51+
cmd: pybabel update --input-file=translations/messages.pot --output-dir=translations --locale={{ .ITEM }}
52+
53+
babel-refresh:
54+
desc: Update translation files from source
55+
cmds:
56+
- task: babel-extract
57+
- task: babel-update
58+
59+
babel-compile:
60+
desc: Compile translation files
61+
cmds:
62+
- pybabel compile --directory=translations
63+
64+
babel-bundle:
65+
desc: Bundle translations
66+
preconditions:
67+
- test -d {{ .TRANSLATIONS }}
68+
cmds:
69+
- for:
70+
var: LOCALES
71+
cmd: |
72+
locale="{{ .ITEM }}"
73+
source="translations/${locale}"
74+
target="{{ .TRANSLATIONS }}/${locale}"
75+
76+
[ ! -d "${target}" ] || rm -r "${target}"
77+
78+
echo "Copying translations for locale ${locale} from ${source} to ${target}..."
79+
cp -r "${source}" "${target}"

setup.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
21
import setuptools
32

43
# we define the license string like this to be backwards compatible to setuptools<77
54
setuptools.setup(license="AGPL-3.0-or-later")
6-

0 commit comments

Comments
 (0)