Skip to content

Commit 4ab9105

Browse files
committed
sort imports with isort
1 parent 8047aa1 commit 4ab9105

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

gguf-py/gguf/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from .constants import *
2-
from .gguf_writer import *
32
from .gguf_reader import *
3+
from .gguf_writer import *
44
from .tensor_mapping import *
55
from .vocab import *

gguf-py/gguf/gguf_reader.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import os
44
from collections import OrderedDict
5-
from typing import TypeVar, NamedTuple
5+
from typing import NamedTuple, TypeVar
66

77
import numpy as np
88
import numpy.typing as npt
@@ -15,12 +15,12 @@
1515
sys.path.insert(0, str(Path(__file__).parent.parent))
1616

1717
from gguf.constants import (
18+
GGML_QUANT_SIZES,
1819
GGUF_DEFAULT_ALIGNMENT,
1920
GGUF_MAGIC,
2021
GGUF_VERSION,
21-
GGML_QUANT_SIZES,
2222
GGMLQuantizationType,
23-
GGUFValueType,
23+
GGUFValueType
2424
)
2525

2626
READER_SUPPORTED_VERSIONS = [2, GGUF_VERSION]

gguf-py/gguf/gguf_writer.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
import shutil
55
import struct
66
import tempfile
7-
from io import BufferedWriter
87
from enum import Enum, auto
9-
from typing import Any, IO, Sequence
8+
from io import BufferedWriter
9+
from typing import IO, Any, Sequence
1010

1111
import numpy as np
1212

@@ -19,9 +19,10 @@
1919
GGUFEndian,
2020
GGUFValueType,
2121
RopeScalingType,
22-
TokenType,
22+
TokenType
2323
)
2424

25+
2526
class WriterState(Enum):
2627
EMPTY = auto()
2728
HEADER = auto()

gguf-py/gguf/tensor_mapping.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
from __future__ import annotations
2+
23
from typing import Sequence
34

45
from .constants import MODEL_ARCH, MODEL_TENSOR, MODEL_TENSORS, TENSOR_NAMES
56

7+
68
class TensorNameMap:
79
mappings_cfg: dict[MODEL_TENSOR, tuple[str, ...]] = {
810
# Token embeddings

gguf-py/gguf/vocab.py

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
from .gguf_writer import GGUFWriter
1010

11+
1112
class SpecialVocab:
1213
merges: list[str]
1314
special_token_ids: dict[str, int]

0 commit comments

Comments
 (0)