Skip to content

Commit ae0bb6d

Browse files
fix: import type hints from beartype
Signed-off-by: thiswillbeyourgithub <[email protected]> fix: import typing from beartype Signed-off-by: thiswillbeyourgithub <[email protected]>
1 parent b24fa88 commit ae0bb6d

16 files changed

+16
-16
lines changed

wdoc/utils/batch_file_loader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from tqdm import tqdm
1616
from functools import cache as memoizer
1717
import time
18-
from typing import List, Tuple, Union, Optional
18+
from beartype.typing import List, Tuple, Union, Optional
1919
import random
2020
from multiprocessing.context import TimeoutError as MultiprocessTimeoutError
2121

wdoc/utils/customs/compressed_embeddings_cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
This is basically the exact same code but with added compression
55
"""
66
from pathlib import Path
7-
from typing import Iterator, List, Optional, Sequence, Tuple, Union
7+
from beartype.typing import Iterator, List, Optional, Sequence, Tuple, Union
88

99
from langchain_core.stores import ByteStore
1010

wdoc/utils/customs/fix_llm_caching.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import json
1111
from pathlib import Path
12-
from typing import Union, Any, Optional, Generator
12+
from beartype.typing import Union, Any, Optional, Generator
1313

1414
from langchain_core.caches import BaseCache
1515

wdoc/utils/embeddings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Loads and store embeddings for each document.
44
"""
55

6-
from typing import List, Union, Optional, Any, Tuple, Callable
6+
from beartype.typing import List, Union, Optional, Any, Tuple, Callable
77
# import math
88
import hashlib
99
import os

wdoc/utils/env.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import sys
88
import os
9-
from typing import Optional, Union, Literal
9+
from beartype.typing import Optional, Union, Literal
1010
from beartype import beartype, BeartypeConf
1111
from beartype.door import is_bearable
1212

wdoc/utils/interact.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Code related to the prompt (in the sense of "directly ask the user a question")
33
"""
44

5-
from typing import Optional, Tuple, Any
5+
from beartype.typing import Optional, Tuple, Any
66
import time
77
from pathlib import Path
88
import json

wdoc/utils/llm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
counting callback.
44
"""
55

6-
from typing import Union, List, Any, Optional, Dict
6+
from beartype.typing import Union, List, Any, Optional, Dict
77
import os
88

99
from langchain_core.callbacks import BaseCallbackHandler

wdoc/utils/loaders.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import sys
88
import os
99
import time
10-
from typing import List, Union, Any, Optional, Callable, Dict, Tuple
10+
from beartype.typing import List, Union, Any, Optional, Callable, Dict, Tuple
1111
import signal
1212
from contextlib import contextmanager
1313
import traceback

wdoc/utils/logger.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from tqdm import tqdm
99
from loguru import logger
1010
from pathlib import Path
11-
from typing import Type, Callable, Optional, Union, List, Dict
11+
from beartype.typing import Type, Callable, Optional, Union, List, Dict
1212
from rich.markdown import Markdown
1313
from rich.console import Console
1414
from platformdirs import user_cache_dir, user_log_dir

wdoc/utils/misc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44

55
import sys
6-
from typing import List, Union, Callable, get_type_hints, Literal
6+
from beartype.typing import List, Union, Callable, get_type_hints, Literal
77
from joblib import Memory
88
from joblib import hash as jhash
99
import uuid

0 commit comments

Comments
 (0)