Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,34 @@ Thus we setup the following rules:

### Coding Style

#### General Style

In this section we are going to see style rules that should be followed across all languages.

**Line breaks after operators**

For long expressions where we break the expression at the operators the line break should come **after** the operator and not before.

The following should be avoided:

```python
participant1_amount = (
participant1_state.deposit
+ participant2_state.transferred_amount
- participant1_state.transferred_amount
);
```

instead it should be:

```python
participant1_amount = (
participant1_state.deposit +
participant2_state.transferred_amount -
participant1_state.transferred_amount
);
```

#### Python

Raiden is written in Python and we follow the official Python style guide
Expand Down
2 changes: 1 addition & 1 deletion raiden/network/blockchain_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def is_synced(self) -> bool:

return True

def estimate_blocktime(self, oldest: int=256) -> float:
def estimate_blocktime(self, oldest: int = 256) -> float:
"""Calculate a blocktime estimate based on some past blocks.
Args:
oldest: delta in block numbers to go back.
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[flake8]
ignore = E731, E402
ignore = E731, E402, W504
max-line-length = 99
exclude = raiden/ui/web/node_modules/

[pep8]
ignore = E731, E402
ignore = E731, E402, W504
max-line-length = 99

[coverage:run]
Expand Down