Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove None initialization #1263

Merged
merged 2 commits into from
Oct 14, 2019

Conversation

pirapira
Copy link
Contributor

@pirapira pirapira commented Oct 2, 2019

that was never needed.

This fixes #1262

What this PR does

This PR removes two lines that initialized variables with None.

Why I'm making this PR

I saw somewhere else mypy complain that these variables might be None. (When I was implementing #1257).

What's tricky about this PR (if any)

Nothing.


Any reviewer can check these:

  • If the PR is fixing a bug or adding a feature, add an entry to CHANGELOG.md.
  • If the PR changed a Solidity source, run make compile_contracts and add the resulting raiden_contracts/data/contracts.json in the PR.
  • If the PR is changing documentation only, add [skip ci] in the commit message so Travis does not waste time.
    • But, if the PR changes comments in a Solidity source, do not add [skip ci] and let Travis check the hash of the source.
  • In Python, use keyword arguments
  • Squash unnecessary commits
  • Comment commits
  • Follow naming conventions
    • solidityFunction
    • _solidity_argument
    • solidity_variable
    • python_variable
    • PYTHON_CONSTANT
  • Follow the Signature Convention in CONTRIBUTING.md
  • For each new contract
    • The deployment script deploys the new contract.
    • etherscan_verify.py runs on the new contract.
  • Bookkeep
    • The gas cost of new functions are stored in gas.json.
  • Solidity specific conventions
    • Document arguments of functions in natspec
    • Care reentrancy problems
  • When you catch a require() failure in Solidity, look for a specific error message like pytest.raises(TransactionFailed, match="error message"):

And before "merge" all checkboxes have to be checked. If you find redundant points, remove them.

that was never needed.

This fixes raiden-network#1262
@pirapira pirapira requested a review from err508 October 2, 2019 14:54
I found an error in the CI
```
$ pipdeptree --warn fail
Warning!!! Possibly conflicting dependencies found:
* astroid==2.3.1
 - six [required: ==1.12, installed: 1.11.0]
```

So from this time on, we will need six >=1.12.
@codecov
Copy link

codecov bot commented Oct 5, 2019

Codecov Report

Merging #1263 into master will increase coverage by 0.67%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1263      +/-   ##
==========================================
+ Coverage   81.28%   81.95%   +0.67%     
==========================================
  Files          21       21              
  Lines        1453     1507      +54     
  Branches      190      205      +15     
==========================================
+ Hits         1181     1235      +54     
+ Misses        231      230       -1     
- Partials       41       42       +1
Impacted Files Coverage Δ
raiden_contracts/contract_manager.py 96.36% <ø> (-0.07%) ⬇️
raiden_contracts/deploy/etherscan_verify.py 91.15% <0%> (+5.44%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 25ad783...8d1beda. Read the comment docs.

Copy link
Contributor

@palango palango left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@pirapira pirapira merged commit ab312b4 into raiden-network:master Oct 14, 2019
@pirapira pirapira deleted the no-none-initialization branch October 14, 2019 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Why does ContractManager use None to initialize checksums in the constructor?
2 participants