File tree Expand file tree Collapse file tree 1 file changed +9
-13
lines changed
Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -32,20 +32,16 @@ jobs:
3232 python -m pip install pytest
3333 pip install -r requirements.txt
3434
35- if [ "${{ matrix.os }}" == "windows-latest" ]; then
36- FOR /F "tokens=1,2 delims=," %%G IN ('python -c "import sys; print(sys.version_info[0:2])"') DO (
37- IF "%%G"=="3" IF "%%H"=="7" (
38- pip install "flake8>=5,<6"
39- ) ELSE (
40- pip install flake8
41- )
42- )
35+ if [ "$RUNNER_OS" == "Windows" ]; then
36+ set PY_VERSION=%PYTHON_VERSION:~-3%
4337 else
44- if [[ $(python -c "import sys; print(sys.version_info[0:2])") == "(3, 7)" ]]; then
45- pip install "flake8>=5,<6"
46- else
47- pip install flake8
48- fi
38+ PY_VERSION=$(python -c "import platform; print(platform.python_version()[:3])")
39+ fi
40+
41+ if [[ "$PY_VERSION" == "3.7" ]]; then
42+ pip install "flake8>=5,<6"
43+ else
44+ pip install flake8
4945 fi
5046 - name : Install the package locally
5147 run : pip install -e .
You can’t perform that action at this time.
0 commit comments