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
96663699
Unverified
Commit
96663699
authored
Jan 20, 2025
by
Chen Zhang
Committed by
GitHub
Jan 20, 2025
Browse files
[CI] Pass local python version explicitly to pre-commit mypy.sh (#12224)
Signed-off-by:
Chen Zhang
<
zhangch99@outlook.com
>
parent
18572e33
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
.pre-commit-config.yaml
.pre-commit-config.yaml
+1
-1
tools/mypy.sh
tools/mypy.sh
+5
-1
No files found.
.pre-commit-config.yaml
View file @
96663699
...
@@ -42,7 +42,7 @@ repos:
...
@@ -42,7 +42,7 @@ repos:
hooks
:
hooks
:
-
id
:
mypy-local
-
id
:
mypy-local
name
:
Run mypy for local Python installation
name
:
Run mypy for local Python installation
entry
:
tools/mypy.sh
entry
:
tools/mypy.sh
0 "local"
language
:
python
language
:
python
types
:
[
python
]
types
:
[
python
]
additional_dependencies
:
&mypy_deps
[
mypy==1.11.1
,
types-setuptools
,
types-PyYAML
,
types-requests
]
additional_dependencies
:
&mypy_deps
[
mypy==1.11.1
,
types-setuptools
,
types-PyYAML
,
types-requests
]
...
...
tools/mypy.sh
View file @
96663699
#!/bin/bash
#!/bin/bash
CI
=
${
1
:-
0
}
CI
=
${
1
:-
0
}
PYTHON_VERSION
=
${
2
:-
3
.9
}
PYTHON_VERSION
=
${
2
:-
local
}
if
[
"
$CI
"
-eq
1
]
;
then
if
[
"
$CI
"
-eq
1
]
;
then
set
-e
set
-e
fi
fi
if
[
$PYTHON_VERSION
==
"local"
]
;
then
PYTHON_VERSION
=
$(
python
-c
'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'
)
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
...
...
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