Skip to content

Two issues related to source code #19

@shadowfall09

Description

@shadowfall09

Hi,

  1. In repograph/utils.py, regarding def parse_python_file(file_path, file_content=None): I noticed that in line 87, ast.AsyncFunctionDef was deliberately omitted. This leads to asynchronous functions being entirely excluded from the parsing result, which causes a mismatch between the actual code structure and the graph constructed later. Additionally, I’m curious about the rationale behind using ast for initial parsing, while tree-sitter is employed in subsequent stages. Could you clarify the reason for using these two different parsing methods?

  2. In repograph/construct_graph.py, line 319 contains the line: category = 'class' if 'class ' in cur_cdl else 'function'
    Based on this logic, any line that doesn’t explicitly contain the keyword 'class ' is treated as a function. However, this means that lines referencing class instantiations or class names (without being actual class definitions) might be misclassified as function definitions. Could you elaborate on the motivation behind this classification approach?

Thanks in advance for the clarification!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions