pycode_similar icon indicating copy to clipboard operation
pycode_similar copied to clipboard

endline of the reference or candidate function is 0

Open qifanyyy opened this issue 4 years ago • 0 comments

When I input two files into pycode-similar, I got "0.6: ref a<18:0>, candidate binary_search<1:0>" for function comparison. From my understanding, I think 18 means the line that starts to be similar in the function, and 0 means the end of the functions. I'm confused if pycode-similar could detect the end of the function and if 0 is the correct result here in my test case.

For test purpose my reference file is :

def hello():
    i = 0
    while i < 5:
        print("hi")
        i += 1
    print("different")
    print("its ok")
def kdd(z):
    z = 2
    z = z + 1
    print(z)
def g():
    pass
def gdd():
    z = 2
    z = z + 2
    print(z)

My candidate file is :

def s():
    print("Hi")
    a = 2
    s = a + 3
    print(s)
    s = s + 1


def sh():
    print("Hi")
    a = 1
    s = a + 2
    print(s)
    s = s + 2

qifanyyy avatar Dec 28 '20 06:12 qifanyyy