Skip to content

Commit 0383609

Browse files
committed
Remove unnecessary TYPE_CHECKING import and adjust type hint for convert_to_tbt function
1 parent 1655685 commit 0383609

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

turn_by_turn/madng.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import logging
2020
from datetime import datetime
2121
from pathlib import Path
22-
from typing import TYPE_CHECKING
2322

2423
import pandas as pd
2524

@@ -30,9 +29,6 @@
3029
except ImportError:
3130
HAS_TFS = False
3231

33-
if TYPE_CHECKING:
34-
from tfs import TfsDataFrame
35-
3632
from turn_by_turn.structures import TbtData, TransverseData
3733

3834
LOGGER = logging.getLogger()
@@ -77,7 +73,7 @@ def read_tbt(file_path: str | Path) -> TbtData:
7773
return convert_to_tbt(df)
7874

7975

80-
def convert_to_tbt(df: pd.DataFrame | TfsDataFrame) -> TbtData:
76+
def convert_to_tbt(df: pd.DataFrame | tfs.TfsDataFrame) -> TbtData:
8177
"""
8278
Convert a TFS or pandas DataFrame to a ``TbtData`` object.
8379

0 commit comments

Comments
 (0)