Use pylint 2.8.2

pull/842/head
Josselin 4 years ago
parent 3c47d2daf9
commit 756abb2455
  1. 2
      CONTRIBUTING.md
  2. 6
      slither/tools/upgradeability/checks/constant.py

@ -37,7 +37,7 @@ To run them locally in the root dir of the repository:
- `pylint slither tests --rcfile pyproject.toml`
- `black . --config pyproject.toml`
We use pylint `2.7.2` black `20.8b1`.
We use pylint `2.8.2` black `20.8b1`.
### Detectors tests
For each new detector, at least one regression tests must be present.

@ -48,8 +48,7 @@ Do not remove `constant` from a state variables during an update.
state_variables_v2 = contract_v2.state_variables
v2_additional_variables = len(state_variables_v2) - len(state_variables_v1)
if v2_additional_variables < 0:
v2_additional_variables = 0
v2_additional_variables = max(v2_additional_variables, 0)
# We keep two index, because we need to have them out of sync if v2
# has additional non constant variables
@ -130,8 +129,7 @@ Do not make an existing state variable `constant`.
state_variables_v2 = contract_v2.state_variables
v2_additional_variables = len(state_variables_v2) - len(state_variables_v1)
if v2_additional_variables < 0:
v2_additional_variables = 0
v2_additional_variables = max(v2_additional_variables, 0)
# We keep two index, because we need to have them out of sync if v2
# has additional non constant variables

Loading…
Cancel
Save