Skip to content

Commit

Permalink
Use pylint 2.8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
montyly committed May 3, 2021
1 parent 3c47d2d commit 756abb2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Expand Up @@ -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.
Expand Down
6 changes: 2 additions & 4 deletions slither/tools/upgradeability/checks/constant.py
Expand Up @@ -48,8 +48,7 @@ def _check(self):
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
Expand Down Expand Up @@ -130,8 +129,7 @@ def _check(self):
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
Expand Down

0 comments on commit 756abb2

Please sign in to comment.