Skip to content

Commit 1985e04

Browse files
CHORE: Bump Python version in pyproject.toml (#2865)
Bump to 3.10.
1 parent bc4ff40 commit 1985e04

File tree

7 files changed

+13
-11
lines changed

7 files changed

+13
-11
lines changed

examples/boft_controlnet/utils/pipeline_controlnet.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
from collections.abc import Callable
1516
from dataclasses import dataclass
16-
from typing import Any, Callable, Optional, Union
17+
from typing import Any, Optional, Union
1718

1819
import numpy as np
1920
import PIL.Image

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[tool.black]
22
# Only used by `hf-doc-builder´.
33
line-length = 119
4-
target-version = ['py38']
4+
target-version = ['py310']
55

66
[tool.ruff]
7-
target-version = "py39"
7+
target-version = "py310"
88
line-length = 119
99
extend-exclude = ["*.ipynb"]
1010

src/peft/optimizers/lorafa.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
from __future__ import annotations
2020

2121
import math
22-
from collections.abc import Iterable
23-
from typing import Callable
22+
from collections.abc import Callable, Iterable
2423

2524
import torch
2625
import torch.nn as nn

src/peft/tuners/lora/corda.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
# Reference paper: https://huggingface.co/papers/2406.05223
1717

1818
import os
19-
from collections.abc import Iterable
20-
from typing import Any, Callable, Optional
19+
from collections.abc import Callable, Iterable
20+
from typing import Any, Optional
2121

2222
import torch
2323
import torch.nn as nn

src/peft/tuners/waveft/waverec2d.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111

1212
from collections.abc import Callable, Sequence
1313
from functools import partial
14-
from typing import Any, NamedTuple, Protocol, Union, cast, overload
14+
from typing import Any, NamedTuple, Protocol, TypeAlias, Union, cast, overload
1515

1616
import numpy as np
1717
import torch
18-
from typing_extensions import TypeAlias, Unpack
18+
from typing_extensions import Unpack
1919

2020
from .wavelet import Wavelet as minimal_wavelet
2121

src/peft/tuners/xlora/layer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
# limitations under the License.
1414
from __future__ import annotations
1515

16-
from typing import Any, Callable, Optional
16+
from collections.abc import Callable
17+
from typing import Any, Optional
1718

1819
import torch
1920
import torch.nn as nn

src/peft/utils/loftq_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919

2020
import logging
2121
import os
22-
from typing import Callable, Optional, Union
22+
from collections.abc import Callable
23+
from typing import Optional, Union
2324

2425
import torch
2526
from accelerate.utils.memory import clear_device_cache

0 commit comments

Comments
 (0)