Skip to content

Commit 4127486

Browse files
authored
Explicitly set versions of validation dependencies
1 parent efc2d04 commit 4127486

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ LABEL "homepage"="https://github.com/cfedermann/python-code-validator"
1010
LABEL "maintainer"="cfedermann"
1111

1212
ENV PYLINT_THRESHOLD "9"
13+
ENV BLACK_LINE_MAXLEN "100"
1314

14-
RUN pip install black mypy pylint-fail-under reorder-python-imports safety
15+
RUN pip install black==21.7b0 mypy==0.900 pylint==2.9.6 pylint-fail-under==0.3.0 reorder-python-imports==2.6.0 safety==1.10.3
1516

1617
COPY entrypoint.sh /entrypoint.sh
1718

entrypoint.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#!/bin/sh -e
22

3+
pip install black==21.7b0 mypy==0.900 pylint==2.9.6 pylint-fail-under==0.3.0 reorder-python-imports==2.6.0 safety==1.10.3
34
pip install -r requirements.txt
45

5-
black -S -l 75 --check .
6-
find . -name "*.py" | xargs mypy
7-
find . -name "*.py" | xargs pylint-fail-under --fail_under $PYLINT_THRESHOLD
8-
find . -name "*.py" | xargs reorder-python-imports --diff-only
6+
black -S -l $BLACK_LINE_MAXLEN --check .
7+
find . -name "*.py" -not -path "./.venv/*" | xargs mypy
8+
find . -name "*.py" -not -path "./.venv/*" | xargs pylint-fail-under --fail_under $PYLINT_THRESHOLD
9+
find . -name "*.py" -not -path "./.venv/*" | xargs reorder-python-imports --diff-only
910
cat requirements.txt | safety check --stdin

0 commit comments

Comments
 (0)