Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion examples/boft_controlnet/utils/pipeline_controlnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from collections.abc import Callable
from dataclasses import dataclass
from typing import Any, Callable, Optional, Union
from typing import Any, Optional, Union

import numpy as np
import PIL.Image
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[tool.black]
# Only used by `hf-doc-builder´.
line-length = 119
target-version = ['py38']
target-version = ['py310']

[tool.ruff]
target-version = "py39"
target-version = "py310"
line-length = 119
extend-exclude = ["*.ipynb"]

Expand Down
3 changes: 1 addition & 2 deletions src/peft/optimizers/lorafa.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
from __future__ import annotations

import math
from collections.abc import Iterable
from typing import Callable
from collections.abc import Callable, Iterable

import torch
import torch.nn as nn
Expand Down
4 changes: 2 additions & 2 deletions src/peft/tuners/lora/corda.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
# Reference paper: https://huggingface.co/papers/2406.05223

import os
from collections.abc import Iterable
from typing import Any, Callable, Optional
from collections.abc import Callable, Iterable
from typing import Any, Optional

import torch
import torch.nn as nn
Expand Down
4 changes: 2 additions & 2 deletions src/peft/tuners/waveft/waverec2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

from collections.abc import Callable, Sequence
from functools import partial
from typing import Any, NamedTuple, Protocol, Union, cast, overload
from typing import Any, NamedTuple, Protocol, TypeAlias, Union, cast, overload

import numpy as np
import torch
from typing_extensions import TypeAlias, Unpack
from typing_extensions import Unpack

from .wavelet import Wavelet as minimal_wavelet

Expand Down
3 changes: 2 additions & 1 deletion src/peft/tuners/xlora/layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
# limitations under the License.
from __future__ import annotations

from typing import Any, Callable, Optional
from collections.abc import Callable
from typing import Any, Optional

import torch
import torch.nn as nn
Expand Down
3 changes: 2 additions & 1 deletion src/peft/utils/loftq_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@

import logging
import os
from typing import Callable, Optional, Union
from collections.abc import Callable
from typing import Optional, Union

import torch
from accelerate.utils.memory import clear_device_cache
Expand Down
Loading