Skip to content

Commit 4779486

Browse files
style: auto-fix linting issues
1 parent d480061 commit 4779486

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

codeflash/languages/python/context/code_context_extractor.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import os
66
from collections import defaultdict
77
from itertools import chain
8-
from pathlib import Path
98
from typing import TYPE_CHECKING
109

1110
import libcst as cst
@@ -35,6 +34,8 @@
3534
from codeflash.optimization.function_context import belongs_to_function_qualified
3635

3736
if TYPE_CHECKING:
37+
from pathlib import Path
38+
3839
from jedi.api.classes import Name
3940

4041
from codeflash.languages.base import HelperFunction
@@ -756,11 +757,9 @@ def extract_init_stub_from_class(class_name: str, module_source: str, module_tre
756757
relevant_nodes: list[ast.FunctionDef | ast.AsyncFunctionDef] = []
757758
for item in class_node.body:
758759
if isinstance(item, (ast.FunctionDef, ast.AsyncFunctionDef)):
759-
if item.name in ("__init__", "__post_init__"):
760-
relevant_nodes.append(item)
761-
elif any(
762-
isinstance(d, ast.Name) and d.id == "property"
763-
or isinstance(d, ast.Attribute) and d.attr == "property"
760+
if item.name in ("__init__", "__post_init__") or any(
761+
(isinstance(d, ast.Name) and d.id == "property")
762+
or (isinstance(d, ast.Attribute) and d.attr == "property")
764763
for d in item.decorator_list
765764
):
766765
relevant_nodes.append(item)

0 commit comments

Comments
 (0)