Coala: Diff: deletion stats can be incorrect

Created on 24 Feb 2017  路  4Comments  路  Source: coala/coala

Since out of range deletions are allowed, the stats that will be created are incorrect

In [1]: from coalib.results.Diff import Diff

In [2]: a = Diff(['1', '2'])

In [3]: a.delete_lines(2,10)

In [4]: a.modified
Out[4]: ['1']

In [5]: a.stats()
Out[5]: (0, 9)

Is this an intended behavior?

arecore difficultlow importanclow typbug

Most helpful comment

No, it shouldn't be, thats what this issue is about

All 4 comments

hm looks indeed wrong...

Should out of range deletion be allowed?

No, it shouldn't be, thats what this issue is about

No I was bit confused about if file_list contains fragment of a file. Nvm figured out I was wrong. :sweat_smile:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jschwarzwalder picture jschwarzwalder  路  6Comments

yash-nisar picture yash-nisar  路  3Comments

userzimmermann picture userzimmermann  路  3Comments

coala-bot picture coala-bot  路  4Comments

userzimmermann picture userzimmermann  路  4Comments