Skip to content

Commit b29af4d

Browse files
Add forward reference annotations and update CI Python version
Introduce the `__future__.annotations` import for better type hints compatibility. Adjust the GitHub Actions workflow to use Python 3.9 instead of 3.12, and set the PYTHONPATH for proper module resolution during tests.
1 parent 82ec585 commit b29af4d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.github/workflows/python-pytests.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Set up Python
2222
uses: actions/setup-python@v4
2323
with:
24-
python-version: '3.12'
24+
python-version: '3.9'
2525

2626
- name: Install dependencies
2727
run: |
@@ -31,6 +31,9 @@ jobs:
3131
pip install poetry
3232
poetry install
3333
34+
- name: Set PYTHONPATH
35+
run: echo "PYTHONPATH=$PYTHONPATH:$(pwd)" >> $GITHUB_ENV
36+
3437
- name: Run tests
3538
run: |
3639
source .venv/bin/activate

database/database.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
import os
24
import psycopg2
35
from typing import Any, Dict

0 commit comments

Comments
 (0)