mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-19 10:21:14 +08:00
Use packaging to parse versions (#8314)
packaging is the standard tool for dealing with versions and requirements. This allows us to easily support all PEP 508 specs. packaging also has good error messages, so I don't create our own here. This lets us get rid of our handrolled half parser and sanity checks. I kept the whitespace consistency check, since that's just a formatting lint and isn't testing the correctness of parsing (which we now definitely do correctly).
This commit is contained in:
4
.github/workflows/tests.yml
vendored
4
.github/workflows/tests.yml
vendored
@@ -25,7 +25,7 @@ jobs:
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.x
|
||||
- run: pip install $(grep tomli== requirements-tests.txt)
|
||||
- run: pip install -r requirements-tests.txt
|
||||
- run: ./tests/check_consistent.py
|
||||
|
||||
new-syntax:
|
||||
@@ -73,7 +73,7 @@ jobs:
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.x
|
||||
- run: pip install $(grep tomli== requirements-tests.txt) $(grep mypy== requirements-tests.txt) termcolor
|
||||
- run: pip install -r requirements-tests.txt
|
||||
- run: ./tests/mypy_test.py --platform=${{ matrix.platform }} --python-version=${{ matrix.python-version }}
|
||||
|
||||
pyright:
|
||||
|
||||
Reference in New Issue
Block a user