10000 Create a new field in `PyImport` to obtain the line of code that contains the import. · Issue #127 · codellm-devkit/python-sdk · GitHub
[go: up one dir, main page]

Skip to content
Create a new field in PyImport to obtain the line of code that contains the import. #127
Open
@rahlk

Description

@rahlk

Is your feature request related to a problem? Please describe.
I'd like to see the body of the import statement in addition the the constituents.

Describe the solution you'd like
We have:

class PyImport(BaseModel):
    from_statement: str
    imports: List[str]

But it'd be nice to have:

class PyImport(BaseModel):
    from_statement: str
    imports: List[str]
    code_body: str

Describe alternatives you've considered
Obtain it manually by slicing the file with the lines of code.

Additional context
None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0