diff --git a/bindings/python/py_src/tokenizers/__init__.py b/bindings/python/py_src/tokenizers/__init__.py index 313593034..efd574298 100644 --- a/bindings/python/py_src/tokenizers/__init__.py +++ b/bindings/python/py_src/tokenizers/__init__.py @@ -1,28 +1,5 @@ from enum import Enum from typing import List, Tuple, Union -from .tokenizers import ( - AddedToken, - Encoding, - NormalizedString, - PreTokenizedString, - Regex, - Token, - Tokenizer, - decoders, - models, - normalizers, - pre_tokenizers, - processors, - trainers, - __version__, -) -from .implementations import ( - BertWordPieceTokenizer, - ByteLevelBPETokenizer, - CharBPETokenizer, - SentencePieceBPETokenizer, - SentencePieceUnigramTokenizer, -) Offsets = Tuple[int, int] @@ -98,3 +75,26 @@ class SplitDelimiterBehavior(Enum): CONTIGUOUS = "contiguous" +from .tokenizers import ( + AddedToken, + Encoding, + NormalizedString, + PreTokenizedString, + Regex, + Token, + Tokenizer, + decoders, + models, + normalizers, + pre_tokenizers, + processors, + trainers, + __version__, +) +from .implementations import ( + BertWordPieceTokenizer, + ByteLevelBPETokenizer, + CharBPETokenizer, + SentencePieceBPETokenizer, + SentencePieceUnigramTokenizer, +) diff --git a/bindings/python/pyproject.toml b/bindings/python/pyproject.toml index 8b043de0c..cbe463370 100644 --- a/bindings/python/pyproject.toml +++ b/bindings/python/pyproject.toml @@ -63,4 +63,6 @@ lint.ignore = [ "F401", # Raw type equality is required in asserts "E721", + # Import order + "E402", ]