Skip to content

Commit 1c5e972

Browse files
committed
import unpack from typing_extensions
1 parent 5e5bd3b commit 1c5e972

File tree

7 files changed

+8
-10
lines changed

7 files changed

+8
-10
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
python-version: ["3.9", "3.10", "3.11", "3.12"]
19+
python-version: ["3.10", "3.11", "3.12"]
2020

2121
steps:
2222
- uses: actions/checkout@v4

src/torchzero/optim/experimental/experimental.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
from collections.abc import Iterable
2-
from typing import Literal, Unpack
1+
from typing import Literal
32

43
from ...modules import (
54
LR,

src/torchzero/optim/first_order/cautious.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
from typing import Literal, Unpack
1+
from typing import Literal
2+
23

34
from ...core import OptimizerModule
45
from ...modules import Cautious, Adam, SGD, Lion, WeightDecay, LR

src/torchzero/optim/first_order/optimizers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from collections.abc import Iterable
2-
from typing import Literal, Unpack
2+
from typing import Literal
33

44
from ...modules import (
55
LR,

src/torchzero/optim/zeroth_order/fdm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Literal, Unpack
1+
from typing import Literal
22

33
import torch
44

src/torchzero/optim/zeroth_order/rfdm.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from typing import Literal, Unpack
2-
31
import torch
42

53
from ...modules import SGD, WrapClosure, LR

src/torchzero/tensorlist.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
from collections.abc import Callable, Sequence, Iterable, Generator
1414
import math
1515
import operator
16-
from typing import Any, Literal, TypedDict, Unpack
17-
from typing_extensions import Self, TypeAlias
16+
from typing import Any, Literal, TypedDict
17+
from typing_extensions import Self, TypeAlias, Unpack
1818

1919
import torch
2020

0 commit comments

Comments
 (0)