Skip to content

Commit a61cdd5

Browse files
authored
Merge pull request #62 from olehermanse/python-version
Dropped python 3.9, added 3.14, and fixed testing for other versions
2 parents 7e552e2 + fc374c6 commit a61cdd5

4 files changed

Lines changed: 12 additions & 6 deletions

File tree

‎.github/workflows/make-check.yml‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ jobs:
2121
check:
2222
runs-on: ubuntu-24.04
2323
strategy:
24-
fail-fast: false
24+
fail-fast: true
2525
matrix:
26-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
26+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
2727
steps:
2828
- uses: actions/checkout@v4
2929
- name: Set up Python ${{ matrix.python-version }}
@@ -36,9 +36,15 @@ jobs:
3636
python -m pip install uv
3737
sudo apt-get install npm
3838
npm install --global prettier
39+
- name: Set python version file for uv
40+
run: |
41+
echo "${{ matrix.python-version }}" > .python-version
3942
- name: Run make check
4043
run: |
4144
make check
45+
- name: Reset python version file
46+
run: |
47+
git restore .python-version
4248
- name: See if there are changes
4349
run: |
4450
git diff --exit-code

‎.python-version‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.13
1+
3.14

‎Makefile‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ venv:
77
uv sync
88

99
format: venv
10-
uv tool run black .
10+
uv tool run black . --target-version py310
1111
prettier . --write
1212

1313
lint: venv
14-
uv tool run black --check .
14+
uv tool run black --check . --fast
1515
uv tool run flake8 src/ --ignore=E203,W503,E722,E731 --max-complexity=100 --max-line-length=160
1616
uv tool run pyflakes src/
1717
uv tool run pyright src/

‎src/cfengine_cli/lint.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ def _lint_node(node: Node, policy_file: PolicyFile, state: State) -> int:
537537
):
538538
_highlight_range(node, lines)
539539
print(
540-
f"Error: {"Bundle" if "bundle" in node.type else "Body"} '{_text(node)}' conflicts with built-in function with the same name {location}"
540+
f"Error: {'Bundle' if 'bundle' in node.type else 'Body'} '{_text(node)}' conflicts with built-in function with the same name {location}"
541541
)
542542
return 1
543543
if node.type == "calling_identifier":

0 commit comments

Comments
 (0)