Skip to content

Commit

Permalink
Update dependencies and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aorwall committed Jul 29, 2024
1 parent aaecd8a commit 5497215
Show file tree
Hide file tree
Showing 6 changed files with 653 additions and 614 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,5 @@ cython_debug/
.idea
notebooks/.ipynb_checkpoints/
notebooks/local_experiments.ipynb

playground
4 changes: 2 additions & 2 deletions moatless/codeblocks/codeblocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -893,10 +893,10 @@ def full_path(self):
@property
def module(self) -> "Module": # noqa: F821
if self.parent:
return self.parent.root()
return self.parent.module
return self

@deprecated("Use module()")
@deprecated("Use codeblock.module")
def root(self) -> "Module": # noqa: F821
return self.module

Expand Down
4 changes: 2 additions & 2 deletions moatless/codeblocks/parser/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def post_process(self, codeblock: CodeBlock):
if rel.type == RelationshipType.IS_A
]
if is_a_rel:
super_class = codeblock.root().find_by_path(is_a_rel[0].path)
super_class = codeblock.module.find_by_path(is_a_rel[0].path)

if super_class:
reference.path = (
Expand Down Expand Up @@ -132,4 +132,4 @@ def post_process(self, codeblock: CodeBlock):
def is_outcommented_code(self, comment):
return comment.startswith("# ...") or any(
keyword in comment.lower() for keyword in commented_out_keywords
)
)
Loading

0 comments on commit 5497215

Please sign in to comment.