Skip to content

Commit 012c9a1

Browse files
committedApr 7, 2024
Add types-PyYAML package and type check Python files with mypy
1 parent b816dc5 commit 012c9a1

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed
 

‎requirements.in

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ packaging
1414
# Tool-specific packages for ZenML extension
1515
watchdog
1616
PyYAML
17+
types-PyYAML
1718
# Conda env fixes: Ensure hash generation for typing-extensions and exceptiongroup on Python < 3.11
1819
typing-extensions>=4.1.0,!=4.6.3; python_version < "3.11"
1920
exceptiongroup==1.2.0; python_version < '3.11'

‎requirements.txt

+4
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ pyyaml==6.0.1 \
8181
--hash=sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d \
8282
--hash=sha256:fd66fc5d0da6d9815ba2cebeb4205f95818ff4b79c3ebe268e75d961704af52f
8383
# via -r ./requirements.in
84+
types-pyyaml==6.0.12.20240311 \
85+
--hash=sha256:a9e0f0f88dc835739b0c1ca51ee90d04ca2a897a71af79de9aec5f38cb0a5342 \
86+
--hash=sha256:b845b06a1c7e54b8e5b4c683043de0d9caf205e7434b3edc678ff2411979b8f6
87+
# via -r ./requirements.in
8488
watchdog==4.0.0 \
8589
--hash=sha256:11e12fafb13372e18ca1bbf12d50f593e7280646687463dd47730fd4f4d5d257 \
8690
--hash=sha256:2895bf0518361a9728773083908801a376743bcc37dfa252b801af8fd281b1ca \

‎scripts/lint.sh

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ export PYTHONPATH
1111
echo "Linting Python files..."
1212
ruff bundled/tool || { echo "Linting Python files failed"; exit 1; }
1313

14+
# Type check Python files with mypy
15+
echo "Type checking Python files with mypy..."
16+
mypy bundled/tool || { echo "Type checking Python files with mypy failed"; exit 1; }
17+
1418
# Lint TypeScript files with eslint
1519
echo "Linting TypeScript files..."
1620
npx eslint 'src/**/*.ts' || { echo "Linting TypeScript files failed"; exit 1; }

0 commit comments

Comments
 (0)
Please sign in to comment.