mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2026-05-06 18:09:49 -05:00
Lint all supported Python versions (#3541)
This commit is contained in:
@@ -21,6 +21,9 @@ defaults:
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubicloud-standard-4
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
@@ -28,7 +31,7 @@ jobs:
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
||||
with:
|
||||
python-version: '3.14'
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install Poetry
|
||||
uses: snok/install-poetry@76e04a911780d5b312d89783f7b1cd627778900a # v1.4.1
|
||||
|
||||
@@ -452,13 +452,13 @@ class HatchetInstrumentor(BaseInstrumentor): # type: ignore[misc]
|
||||
kwargs: dict[str, Any],
|
||||
) -> list[Any]:
|
||||
try:
|
||||
import annotationlib
|
||||
import annotationlib # type: ignore[import-not-found, unused-ignore]
|
||||
|
||||
# Python 3.14+ with PEP 749 can fail evaluating annotations lazily,
|
||||
# so use Format.STRING to avoid resolving type hints.
|
||||
sig = inspect.signature(
|
||||
wrapped_func,
|
||||
annotation_format=annotationlib.Format.STRING,
|
||||
annotation_format=annotationlib.Format.STRING, # type: ignore[call-arg, unused-ignore]
|
||||
)
|
||||
except Exception:
|
||||
# Fallback for Python < 3.14 where annotation_format is not supported
|
||||
|
||||
Reference in New Issue
Block a user