Skip to content

Commit

Permalink
Support Python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
HGSilveri committed Jun 6, 2024
1 parent fd4457d commit 51a0cbd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3,12"]
steps:
- name: Check out Pulser
uses: actions/checkout@v4
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
# Python 3.8 and 3.9 does not run on macos-latest (14)
# Uses macos-13 for 3.8 and 3.9 and macos-latest for >=3.10
os: [ubuntu-latest, macos-13, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
exclude:
- os: macos-latest
python-version: "3.8"
Expand All @@ -28,6 +28,8 @@ jobs:
python-version: "3.10"
- os: macos-13
python-version: "3.11"
- os: macos-13
python-version: "3.12"
steps:
- name: Check out Pulser
uses: actions/checkout@v4
Expand Down
4 changes: 3 additions & 1 deletion pulser-core/pulser/channels/eom.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,9 @@ def __post_init__(self) -> None:
"There must be at least one beam in 'controlled_beams'."
)
for beam in chain((self.limiting_beam,), self.controlled_beams):
if not (isinstance(beam, RydbergBeam) and beam in RydbergBeam):
if not (
isinstance(beam, RydbergBeam) and beam in tuple(RydbergBeam)
):
raise TypeError(
"Every beam must be one of options of the `RydbergBeam`"
f" enumeration, not {self.limiting_beam}."
Expand Down

0 comments on commit 51a0cbd

Please sign in to comment.