python: plugin cleanup and refactor

This commit is contained in:
A_D
2018-12-26 20:46:31 +02:00
committed by TingPing
parent a5a727122b
commit 7abeb10cf1
3 changed files with 143 additions and 73 deletions

View File

@@ -0,0 +1,26 @@
# HexChat Python Module Style Guide
(This is a work in progress).
## General rules
- PEP8 as general fallback recommendations
- Max line length: 120
- Avoid overcomplex compound statements. i.e. dont do this: `somevar = x if x == y else z if a == b and c == b else x`
## Indentation style
### Multi-line functions
```python
foo(really_long_arg_1,
really_long_arg_2)
```
### Mutli-line lists/dicts
```python
foo = {
'bar': 'baz',
}
```