File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
slither/tools/upgradeability/checks Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ To run them locally in the root dir of the repository:
37
37
- ` pylint slither tests --rcfile pyproject.toml `
38
38
- ` black . --config pyproject.toml `
39
39
40
- We use pylint ` 2.7 .2 ` black ` 20.8b1 ` .
40
+ We use pylint ` 2.8 .2 ` black ` 20.8b1 ` .
41
41
### Detectors tests
42
42
43
43
For each new detector, at least one regression tests must be present.
Original file line number Diff line number Diff line change @@ -48,8 +48,7 @@ def _check(self):
48
48
state_variables_v2 = contract_v2 .state_variables
49
49
50
50
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 )
53
52
54
53
# We keep two index, because we need to have them out of sync if v2
55
54
# has additional non constant variables
@@ -130,8 +129,7 @@ def _check(self):
130
129
state_variables_v2 = contract_v2 .state_variables
131
130
132
131
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 )
135
133
136
134
# We keep two index, because we need to have them out of sync if v2
137
135
# has additional non constant variables
You can’t perform that action at this time.
0 commit comments