Skip to content

Commit 756abb2

Browse files
committed
Use pylint 2.8.2
1 parent 3c47d2d commit 756abb2

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ To run them locally in the root dir of the repository:
3737
- `pylint slither tests --rcfile pyproject.toml`
3838
- `black . --config pyproject.toml`
3939

40-
We use pylint `2.7.2` black `20.8b1`.
40+
We use pylint `2.8.2` black `20.8b1`.
4141
### Detectors tests
4242

4343
For each new detector, at least one regression tests must be present.

slither/tools/upgradeability/checks/constant.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ def _check(self):
4848
state_variables_v2 = contract_v2.state_variables
4949

5050
v2_additional_variables = len(state_variables_v2) - len(state_variables_v1)
51-
if v2_additional_variables < 0:
52-
v2_additional_variables = 0
51+
v2_additional_variables = max(v2_additional_variables, 0)
5352

5453
# We keep two index, because we need to have them out of sync if v2
5554
# has additional non constant variables
@@ -130,8 +129,7 @@ def _check(self):
130129
state_variables_v2 = contract_v2.state_variables
131130

132131
v2_additional_variables = len(state_variables_v2) - len(state_variables_v1)
133-
if v2_additional_variables < 0:
134-
v2_additional_variables = 0
132+
v2_additional_variables = max(v2_additional_variables, 0)
135133

136134
# We keep two index, because we need to have them out of sync if v2
137135
# has additional non constant variables

0 commit comments

Comments
 (0)