Correctly return line counts in the FileDiffCollectionMixin
Review Request #10099 — Created July 24, 2018 and submitted
The
FileDiffCollectionMixin
incorrectly assumed that counts would
always be integers. However, before chunks are generated, some line
counts may beNone
. This patch works around that limitation and
returns the correct result for that case. Unit tests have been added to
test this behaviour.
Ran unit tests.
Description | From | Last Updated |
---|---|---|
E501 line too long (81 > 79 characters) |
reviewbot | |
F841 local variable 'filediffs' is assigned to but never used |
reviewbot | |
This would be nicer as: if value: if counts[key] is None: counts[key] = value else: counts[key] += value |
chipx86 | |
Missing a test docstring. |
chipx86 | |
Is this the start of a brand new set of tests? If so, it should be its own test. |
chipx86 | |
F821 undefined name 'commits' |
reviewbot | |
F821 undefined name 'commits' |
reviewbot | |
F821 undefined name 'diffset' |
reviewbot | |
F821 undefined name 'commits' |
reviewbot | |
F821 undefined name 'commits' |
reviewbot | |
E303 too many blank lines (2) |
reviewbot | |
F821 undefined name 'diffset' |
reviewbot | |
F821 undefined name 'diffset' |
reviewbot | |
F821 undefined name 'commits' |
reviewbot | |
F821 undefined name 'commits' |
reviewbot |
- Commit:
-
5caef7e863445d1918e894b193e48cded60ab1e235647a0eb4bd6008cd6ddd7c440847f04f1d75b6
Checks run (2 succeeded)
- Change Summary:
-
Addressed feedback.
- Commit:
-
35647a0eb4bd6008cd6ddd7c440847f04f1d75b6fb4a24af3a0d32fe4e27cca790011e21b8e46756