Skip to content
This repository was archived by the owner on Mar 16, 2024. It is now read-only.

Replace redbaron with python's ast module inside the module loader.#133

Merged
emrgnt-cmplxty merged 5 commits intomainfrom
replace_redbaron_with_ast_
Jul 6, 2023
Merged

Replace redbaron with python's ast module inside the module loader.#133
emrgnt-cmplxty merged 5 commits intomainfrom
replace_redbaron_with_ast_

Conversation

@bhavitsharma
Copy link
Copy Markdown
Collaborator

@bhavitsharma bhavitsharma commented Jul 6, 2023

Replace RedBaron with python's AST module in the python loader.
Next steps:

  • Replace it inside the reader/writer/navigation/symbol_utils.
  • Replace it everywhere else

self,
root_fpath: str = get_root_fpath(),
py_fpath: str = get_root_py_fpath(),
parsing_strategy: Union[None, ParsingStrategy] = None,
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be able to use Optional instead of Union[None,

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ooo, nice catch

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should also prototype a pr-review agent which suggests fixes based on code review comments

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

_remove_docstrings(child_node)

module = py_module_loader.fetch_module(module_dotpath)
module = cast(RedBaron, py_module_loader.fetch_module(module_dotpath))
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry for the ugly cast, will be going away in next PR

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nw

@emrgnt-cmplxty emrgnt-cmplxty merged commit b9fae27 into main Jul 6, 2023
@emrgnt-cmplxty emrgnt-cmplxty deleted the replace_redbaron_with_ast_ branch July 6, 2023 16:39
@bhavitsharma bhavitsharma restored the replace_redbaron_with_ast_ branch July 6, 2023 19:43
@emrgnt-cmplxty emrgnt-cmplxty deleted the replace_redbaron_with_ast_ branch July 6, 2023 21:51
Huntemall pushed a commit to Huntemall/automata-dev that referenced this pull request Oct 30, 2023
…or-the-agent-config-complex

major refactor
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants