Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
e036e527
Unverified
Commit
e036e527
authored
Nov 07, 2024
by
Russell Bryant
Committed by
GitHub
Nov 07, 2024
Browse files
[CI/Build] Improve mypy + python version matrix (#10041)
Signed-off-by:
Russell Bryant
<
rbryant@redhat.com
>
parent
6192e9b8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
6 deletions
+5
-6
.github/workflows/mypy.yaml
.github/workflows/mypy.yaml
+1
-1
pyproject.toml
pyproject.toml
+1
-3
tools/mypy.sh
tools/mypy.sh
+3
-2
No files found.
.github/workflows/mypy.yaml
View file @
e036e527
...
@@ -43,4 +43,4 @@ jobs:
...
@@ -43,4 +43,4 @@ jobs:
-
name
:
Mypy
-
name
:
Mypy
run
:
|
run
:
|
echo "::add-matcher::.github/workflows/matchers/mypy.json"
echo "::add-matcher::.github/workflows/matchers/mypy.json"
tools/mypy.sh 1
tools/mypy.sh 1
${{ matrix.python-version }}
pyproject.toml
View file @
e036e527
...
@@ -55,14 +55,12 @@ ignore = [
...
@@ -55,14 +55,12 @@ ignore = [
]
]
[tool.mypy]
[tool.mypy]
python_version
=
"3.9"
ignore_missing_imports
=
true
ignore_missing_imports
=
true
check_untyped_defs
=
true
check_untyped_defs
=
true
follow_imports
=
"silent"
follow_imports
=
"silent"
# After fixing type errors resulting from follow_imports: "skip" -> "silent",
# After fixing type errors resulting from follow_imports: "skip" -> "silent",
# move the directory here and remove it from
format.sh and
mypy.
yaml
# move the directory here and remove it from
tools/
mypy.
sh
files
=
[
files
=
[
"vllm/*.py"
,
"vllm/*.py"
,
"vllm/adapter_commons"
,
"vllm/adapter_commons"
,
...
...
tools/mypy.sh
View file @
e036e527
#!/bin/bash
#!/bin/bash
CI
=
${
1
:-
0
}
CI
=
${
1
:-
0
}
PYTHON_VERSION
=
${
2
:-
3
.9
}
if
[
$CI
-eq
1
]
;
then
if
[
$CI
-eq
1
]
;
then
set
-e
set
-e
...
@@ -9,10 +10,10 @@ fi
...
@@ -9,10 +10,10 @@ fi
run_mypy
()
{
run_mypy
()
{
echo
"Running mypy on
$1
"
echo
"Running mypy on
$1
"
if
[
$CI
-eq
1
]
&&
[
-z
"
$1
"
]
;
then
if
[
$CI
-eq
1
]
&&
[
-z
"
$1
"
]
;
then
mypy
"
$@
"
mypy
--python-version
"
${
PYTHON_VERSION
}
"
"
$@
"
return
return
fi
fi
mypy
--follow-imports
skip
"
$@
"
mypy
--follow-imports
skip
--python-version
"
${
PYTHON_VERSION
}
"
"
$@
"
}
}
run_mypy
# Note that this is less strict than CI
run_mypy
# Note that this is less strict than CI
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment