ethereum / sharding

Sharding manager contract, and related software and tests
480 stars 105 forks source link

Fix from_block and enforce passing arguments by keyword for long signatures #104

Closed NIC619 closed 6 years ago

NIC619 commented 6 years ago

How was it fixed?

Cute Animal Picture

put a cute animal picture link inside the parentheses

jannikluhn commented 6 years ago

I don't thing using the * syntax everywhere is a good idea. There are a lot of places where it's clear what an argument means and in these cases passing it as keyword just adds clutter. Good example: get_notary_info(self, *, notary_address: bytes).

NIC619 commented 6 years ago

@jannikluhn @mhchia @hwwhww I apologize for a sudden code style change. Should've opened an issue first. If this is not a desired improvement, I will revert it. My reason is simply to minimize the chances of passing in arguments in wrong order and also improve readability.

I had thought about not having it enforced on every function too. We could enforce it only on functions that have more than X parameters like how it's done in py-evm.

NIC619 commented 6 years ago

@hwwhww @jannikluhn @mhchia Rebased and replace PEP3102 with py-evm code style. And also some minor fix on test cases and type check.

Copied from description.