diff options
author | A_D <A_D@snoonet.org> | 2018-12-26 20:46:31 +0200 |
---|---|---|
committer | TingPing <tingping@tingping.se> | 2019-01-02 18:50:10 -0500 |
commit | 7abeb10cf1f82fbad4d167f9e6f6918e1f47650b (patch) | |
tree | fc2a7469951acbd89dbb9e32fb51aeb78e9e0c5e /plugins/python/python_style_guide.md | |
parent | a5a727122b66c9003b44fcdc199ad56dbe15a131 (diff) |
python: plugin cleanup and refactor
Diffstat (limited to 'plugins/python/python_style_guide.md')
-rw-r--r-- | plugins/python/python_style_guide.md | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/plugins/python/python_style_guide.md b/plugins/python/python_style_guide.md new file mode 100644 index 00000000..41db2474 --- /dev/null +++ b/plugins/python/python_style_guide.md @@ -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', +} +``` |