fix(mypy)

closes #5484
This commit is contained in:
Jacob Heider 2024-03-08 11:33:26 -05:00 committed by Jacob Heider
parent eb2b6cc24c
commit e21c4f0e9e

View file

@ -1,21 +1,27 @@
distributable: distributable:
url: https://github.com/python/mypy/archive/refs/tags/v{{version}}.tar.gz url: https://github.com/python/mypy/archive/refs/tags/{{version.tag}}.tar.gz
strip-components: 1 strip-components: 1
versions: versions:
github: python/mypy/tags github: python/mypy/tags
dependencies: dependencies:
python.org: '>=3<3.12' pkgx.sh: ^1
build: build:
dependencies:
python.org: '>=3<3.12'
env: env:
MYPY_USE_MYPYC: 1 MYPY_USE_MYPYC: 1
MYPYC_OPT_LEVEL: 3 MYPYC_OPT_LEVEL: 3
script: | script:
python-venv.sh {{prefix}}/bin/mypy - bkpyvenv stage {{prefix}} {{version}}
cp {{prefix}}/bin/mypy {{prefix}}/bin/mypyc - ${{prefix}}/venv/bin/pip install .
cp {{prefix}}/bin/mypy {{prefix}}/bin/dmypy - bkpyvenv seal {{prefix}} mypy
- run: |
ln -s mypy mypyc
ln -s mypy dmypy
working-directory: '{{prefix}}/bin'
provides: provides:
- bin/mypy - bin/mypy
@ -23,10 +29,8 @@ provides:
- bin/dmypy - bin/dmypy
test: test:
fixture: | - mypy --version | grep {{version}}
a: str = 1 - mypyc --version | grep {{version}}
script: | - dmypy --version | grep {{version}}
mypy --version | grep {{version}} - run: echo $(mypy $FIXTURE || true) | grep "Incompatible types in assignment"
mypyc --version | grep {{version}} fixture: 'a: str = 1'
dmypy --version | grep {{version}}
echo $(mypy $FIXTURE || true) | grep "Incompatible types in assignment"