Skip to content

Commit

Permalink
Add Py3.12 to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBB committed Feb 6, 2024
1 parent 3c6cc82 commit f06ea7c
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11', '3.12']
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: cp38-* cp39-* cp310-* cp311-*
CIBW_BUILD: cp39-* cp310-* cp311-* cp312-*
CIBW_SKIP: '*musllinux*'
CIBW_BEFORE_BUILD: pip install -r requirements.dev.txt
- uses: actions/upload-artifact@v3
Expand Down
34 changes: 34 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
from __future__ import annotations

from typing import SupportsFloat, Sequence, Protocol, SupportsIndex, Iterator, Any, TypeVar, List, overload, Union
import numpy as np
from numpy.typing import ArrayLike


# T_co = TypeVar("T_co", covariant=True)


# class Seq(Protocol[T_co]):
# def __len__(self) -> int: ...
# @overload
# def __getitem__(self, index: SupportsIndex, /) -> T_co: ...
# @overload
# def __getitem__(self, index: slice, /) -> Seq[T_co]: ...
# def __iter__(self) -> Iterator[T_co]: ...
# def __contains__(self, x: Any) -> bool: ...
# def __reversed__(self, /) -> Iterator[T_co]: ...
# def count(self, value: Any, /) -> int: ...
# def index(self, value: Any, /) -> int: ...


# b: Seq[SupportsFloat]

# a: ArrayLike = b

f: float
n: np.floating
u: Union[float, np.floating]

reveal_type(abs(f))
reveal_type(abs(n))
reveal_type(abs(u))

0 comments on commit f06ea7c

Please sign in to comment.