mirror of
https://github.com/codeflash-ai/codeflash.git
synced 2026-05-04 18:25:17 +00:00
fix: move Path import into TYPE_CHECKING block in code_extractor.py
Fixes ruff TC003 — Path is only used in annotations which are strings at runtime due to `from __future__ import annotations`.
This commit is contained in:
parent
e55e552698
commit
1d1d183075
1 changed files with 2 additions and 1 deletions
|
|
@ -4,7 +4,6 @@ import ast
|
|||
import time
|
||||
from importlib.util import find_spec
|
||||
from itertools import chain
|
||||
from pathlib import Path
|
||||
from typing import TYPE_CHECKING, Optional
|
||||
|
||||
import libcst as cst
|
||||
|
|
@ -18,6 +17,8 @@ from codeflash.languages.base import Language
|
|||
from codeflash.models.models import FunctionParent
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from pathlib import Path
|
||||
|
||||
from libcst.helpers import ModuleNameAndPackage
|
||||
|
||||
from codeflash.discovery.functions_to_optimize import FunctionToOptimize
|
||||
|
|
|
|||
Loading…
Reference in a new issue