Skip to content

Commit ae9fa45

Browse files
committed
black: target Python 3.6; longer lines to match flake8 config
1 parent 22aa582 commit ae9fa45

File tree

2 files changed

+25
-6
lines changed

2 files changed

+25
-6
lines changed

cwltool.Dockerfile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ RUN apk add --no-cache git gcc python3-dev libxml2-dev libxslt-dev libc-dev linu
44

55
WORKDIR /cwltool
66
COPY . .
7-
8-
RUN pip install toml -rmypy-requirements.txt -rrequirements.txt
9-
RUN CWLTOOL_USE_MYPYC=1 MYPYPATH=mypy-stubs pip wheel --no-binary schema-salad --wheel-dir=/wheels .[deps]
7+
RUN CWLTOOL_USE_MYPYC=1 MYPYPATH=mypy-stubs pip wheel --no-binary schema-salad \
8+
--wheel-dir=/wheels .[deps] # --verbose
109
RUN rm /wheels/schema_salad*
11-
RUN pip install black
10+
RUN pip install "black~=22.0"
11+
# galaxy-util 22.1.2 depends on packaging<22, but black 23.x needs packaging>22
1212
RUN SCHEMA_SALAD_USE_MYPYC=1 MYPYPATH=mypy-stubs pip wheel --no-binary schema-salad \
13-
$(grep schema.salad requirements.txt) black --wheel-dir=/wheels
14-
RUN pip install --force-reinstall --no-index --no-warn-script-location --root=/pythonroot/ /wheels/*.whl
13+
$(grep schema.salad requirements.txt) "black~=22.0" --wheel-dir=/wheels # --verbose
14+
RUN pip install --force-reinstall --no-index --no-warn-script-location \
15+
--root=/pythonroot/ /wheels/*.whl
1516
# --force-reinstall to install our new mypyc compiled schema-salad package
1617

1718
FROM python:3.11-alpine as module

pyproject.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[build-system]
2+
requires = [
3+
"setuptools>=45",
4+
'mypy==0.971; python_version == "3.6"', # last version for Python 3.6
5+
'mypy==0.991; python_version >= "3.7"',
6+
"types-pkg_resources",
7+
"types-requests",
8+
"types-psutil",
9+
"ruamel.yaml>=0.16.0,<0.17.22",
10+
"schema-salad>=8.2.20211104054942,<9",
11+
"cwl-utils >=0.19",
12+
'toml',
13+
]
14+
build-backend = "setuptools.build_meta"
15+
16+
[tool.black]
17+
line-length = 100
18+
target-version = [ "py36" ]

0 commit comments

Comments
 (0)