Skip to content

Commit cfdf7cc

Browse files
committed
rename our local type stubs directory
as per python/mypy#13155 (comment) Set more accurate minimum versions for ruamel-yaml
1 parent 46d03e1 commit cfdf7cc

File tree

5 files changed

+15
-10
lines changed

5 files changed

+15
-10
lines changed

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ venv3/
2828
# pycharm
2929
.idea/
3030

31-
# typshed repo
32-
typeshed/2and3/schema_salad
33-
typeshed/2and3/ruamel/yaml
31+
# local type stubs
32+
mypy-stubs/ruamel/yaml
3433

3534

3635
#mypy

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ clean: FORCE
7272
# Linting and code style related targets
7373
## sorting imports using isort: https://github.com/timothycrosley/isort
7474
sort_imports: $(PYSOURCES)
75-
isort $^ typeshed
75+
isort $^
7676

7777
remove_unused_imports: $(PYSOURCES)
7878
autoflake --in-place --remove-all-unused-imports $^
@@ -93,7 +93,7 @@ format:
9393
black setup.py cwlupgrader tests
9494

9595
format-check:
96-
black --diff --check cwlupgrader setup.py typeshed
96+
black --diff --check cwlupgrader setup.py
9797

9898
## pylint : run static code analysis on Python code
9999
pylint: $(PYSOURCES)
@@ -153,11 +153,11 @@ mypy3: mypy
153153
mypy: $(PYSOURCES)
154154
if ! test -f $(shell python3 -c 'import ruamel.yaml; import os.path; print(os.path.dirname(ruamel.yaml.__file__))')/py.typed ; \
155155
then \
156-
rm -Rf typeshed/ruamel/yaml ; \
156+
rm -Rf mypy-stubs/ruamel/yaml ; \
157157
ln -s $(shell python3 -c 'import ruamel.yaml; import os.path; print(os.path.dirname(ruamel.yaml.__file__))') \
158-
typeshed/ruamel/ ; \
158+
mypy-stubs/ruamel/ ; \
159159
fi # if minimally required ruamel.yaml version is 0.15.99 or greater, than the above can be removed
160-
MYPYPATH=$$MYPYPATH:typeshed mypy $^
160+
MYPYPATH=$$MYPYPATH:mypy-stubs mypy $^
161161

162162
pyupgrade: $(PYSOURCES)
163163
pyupgrade --exit-zero-even-if-changed --py36-plus $^
File renamed without changes.

requirements.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
ruamel.yaml >= 0.14.12, < 0.17.22
1+
ruamel.yaml >= 0.16.0, < 0.17.22;python_version>='3.10'
2+
ruamel.yaml >= 0.15.98, < 0.17.22;python_version>='3.9'
3+
ruamel.yaml >= 0.15.78, < 0.17.22;python_version>='3.8'
4+
ruamel.yaml >= 0.15.71, < 0.17.22
25
schema-salad

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@
2727
package_data={"cwlupgrader.tests": ["../testdata/**/*.cwl"]},
2828
install_requires=[
2929
"setuptools",
30-
"ruamel.yaml >= 0.14.12, < 0.17.22",
30+
"ruamel.yaml >= 0.16.0, < 0.17.22;python_version>='3.10'",
31+
"ruamel.yaml >= 0.15.98, < 0.17.22;python_version>='3.9'",
32+
"ruamel.yaml >= 0.15.78, < 0.17.22;python_version>='3.8'",
33+
"ruamel.yaml >= 0.15.71, < 0.17.22",
3134
"schema_salad",
3235
],
3336
entry_points={"console_scripts": ["cwl-upgrader = cwlupgrader.main:main"]},

0 commit comments

Comments
 (0)