-
Notifications
You must be signed in to change notification settings - Fork 100
Replace redbaron with python's ast module inside the module loader. #133
Conversation
self, | ||
root_fpath: str = get_root_fpath(), | ||
py_fpath: str = get_root_py_fpath(), | ||
parsing_strategy: Union[None, ParsingStrategy] = None, |
There was a problem hiding this comment.
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,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ooo, nice catch
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
… replace_redbaron_with_ast_
@@ -94,7 +94,7 @@ def _remove_docstrings(node: FSTNode) -> None: | |||
if child_node is not node: | |||
_remove_docstrings(child_node) | |||
|
|||
module = py_module_loader.fetch_module(module_dotpath) | |||
module = cast(RedBaron, py_module_loader.fetch_module(module_dotpath)) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nw
…or-the-agent-config-complex major refactor
Replace RedBaron with python's AST module in the python loader.
Next steps: