Skip to content

Commit

Permalink
fix 3.11 typing
Browse files Browse the repository at this point in the history
  • Loading branch information
dakk committed Oct 30, 2023
1 parent 81ac9e0 commit aba9a0e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

strategy:
matrix:
python-version: ["3.11", "3.12"]
python-version: ["3.11"] #, "3.12"]

steps:
- name: Checkout
Expand Down
4 changes: 2 additions & 2 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@
### Week 2: (30 Oct 23)

- [x] Integrate qrack on test suite
- [ ] Test on multiple py version
- [ ] Fixed size list support
- [x] Test / support on multiple py version >= 3.8
- [ ] Fixed size list sugar
- [ ] Groover algorithm tests
- [ ] Slideshow for UF midterm

Expand Down
7 changes: 6 additions & 1 deletion qlasskit/ast2logic/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import sys
from typing import Dict, List, Tuple

from sympy import Symbol
from sympy.logic.boolalg import Boolean
from typing_extensions import TypeAlias

if sys.version_info < (3, 11):
from typing_extensions import TypeAlias
else:
from typing import TypeAlias

from ..types import BUILTIN_TYPES, Qint, Qtype # noqa: F401, E402
from . import exceptions
Expand Down
7 changes: 6 additions & 1 deletion qlasskit/types/qtype.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import sys
from typing import Any, List, Literal, Tuple

from sympy.logic.boolalg import Boolean, Not
from typing_extensions import TypeAlias

if sys.version_info < (3, 11):
from typing_extensions import TypeAlias
else:
from typing import TypeAlias

TType: TypeAlias = object
TExp: TypeAlias = Tuple[TType, Boolean]
Expand Down

0 comments on commit aba9a0e

Please sign in to comment.