Skip to content

Commit 701957c

Browse files
committed
Specify py-version in Python command
1 parent e7eef90 commit 701957c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/pylint.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,18 @@ on:
1111
jobs:
1212
analyze:
1313
runs-on: ubuntu-latest
14+
env:
15+
PYTHON_VERSION: '3.13'
1416
steps:
1517
- uses: actions/checkout@v4
1618
- name: Set up Python
1719
uses: actions/setup-python@v5
1820
with:
19-
python-version: '3.13'
21+
python-version: ${{ env.PYTHON_VERSION }}
2022
- name: Install global dependencies
2123
run: |
2224
python -m pip install --upgrade pip
23-
python -m pip install pylint
25+
python -m pip install --upgrade pylint
2426
- name: Lint all functions
2527
run: |
2628
# Find all subdirectories in functions/ that contain Python files
@@ -39,7 +41,7 @@ jobs:
3941
4042
# Run pylint on the function directory
4143
echo "Running pylint on $func_name..."
42-
pylint "$func_dir" --max-line-length=127 --disable=R0801 || {
44+
pylint "$func_dir" --max-line-length=127 --disable=R0801 --py-version=${{ env.PYTHON_VERSION }} || {
4345
echo "::error::Pylint failed for $func_name"
4446
exit 1
4547
}

0 commit comments

Comments
 (0)