You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for your contribution, but I encountered an issue when running cd.difference: AttributeError: partially initialized module 'code_diff' has no attribute 'difference' (most likely due to a circular import). Could you please help explain why this bug occurs?
import code_diff as cd
# Python
output = cd.difference(
'''
def my_func():
print("Hello World")
''',
'''
def say_helloworld():
print("Hello World")
''',
lang = "python")
# Output: my_func -> say_helloworld
output.edit_script()
# Output:
# [
# Update((identifier:my_func, line 1:12 - 1:19), say_helloworld)
#]
# Java
output = cd.difference(
'''
int x = x + 1;
''',
'''
int x = x / 2;
''',
lang = "java")
# Output: x + 1 -> x / 2
output.edit_script()
# Output: [
# Insert(/:/, (binary_operator, line 0:4 - 0:9), 1),
# Update((integer:1, line 0:8 - 0:9), 2),
# Delete((+:+, line 0:6 - 0:7))
#]
The text was updated successfully, but these errors were encountered:
Sorry for the delayed answer. Sadly, I have no idea why this problem occurs. Did you fix the problem in the meantime? Or could you give some further hints about your setup? Thanks!
Thank you for your contribution, but I encountered an issue when running cd.difference: AttributeError: partially initialized module 'code_diff' has no attribute 'difference' (most likely due to a circular import). Could you please help explain why this bug occurs?
The text was updated successfully, but these errors were encountered: