Skip to content

Commit 003f9c7

Browse files
committed
Require python 3.8 + fix broken tests
1 parent a0e8775 commit 003f9c7

5 files changed

Lines changed: 8 additions & 14 deletions

File tree

‎open_hypergraphs/array/backend.py‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
""" Loosely typed array backend protocol """
2-
from typing import Generic, Type, TypeVar, Sequence, List, Tuple, Any
3-
from typing_extensions import Protocol
4-
2+
from typing import Protocol, Generic, Type, TypeVar, Sequence, List, Tuple, Any
53
from collections.abc import MutableMapping
64

75
# Arrays are (very) loosely typed

‎open_hypergraphs/finite_function.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@
3838

3939
from dataclasses import dataclass
4040
from abc import abstractmethod, ABC
41-
from typing import List, Type, Union, Any
42-
from typing_extensions import Protocol
41+
from typing import Protocol, List, Type, Union, Any
4342

4443
from open_hypergraphs.array.backend import ArrayBackend, ArrayType
4544

‎open_hypergraphs/hypergraph.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
from typing import Any, Type
2-
from typing_extensions import Protocol
1+
from typing import Protocol, Any, Type
32
from abc import ABC, abstractmethod
43
from dataclasses import dataclass
54
from open_hypergraphs.finite_function import FiniteFunction, IndexedCoproduct, HasIndexedCoproduct

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ authors = [
66
]
77
description = "open hypergraphs"
88
readme = "README.md"
9-
requires-python = ">= 3.7"
9+
requires-python = ">= 3.8"
1010
classifiers = [
1111
"Programming Language :: Python :: 3",
1212
"License :: OSI Approved :: MIT License",

‎tests/test_optic.py‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,7 @@ def test_dagger_optic_identity2(self):
6666
# Test case for singleton op f : A ● B → C, which we assume has a dagger
6767
# f† : C → B ● A
6868
def test_dagger_optic_singleton(self):
69-
F = FrobeniusIdentity()
70-
R = FrobeniusDagger()
71-
O = DaggerOptic(F, R)
69+
O = DaggerOptic()
7270

7371
X = FiniteFunction(None, FiniteFunction.Array.array(["A", "B"], dtype='O'))
7472
Y = FiniteFunction(None, FiniteFunction.Array.array(["Y"], dtype='O'))
@@ -90,9 +88,9 @@ def test_dagger_optic_singleton(self):
9088

9189
@given(OpenHyp.arrows())
9290
def test_dagger_optic_type(self, f):
93-
F = FrobeniusIdentity()
94-
R = FrobeniusDagger()
95-
O = DaggerOptic(F, R)
91+
O = DaggerOptic()
92+
F = O.F
93+
R = O.R
9694

9795
Of = O(f)
9896
FA = F.map_objects(f.source)

0 commit comments

Comments
 (0)