summary refs log tree commit diff stats
path: root/plugins/python/python_style_guide.md
diff options
context:
space:
mode:
authorSoniEx2 <endermoneymod@gmail.com>2021-05-27 20:39:07 -0300
committerSoniEx2 <endermoneymod@gmail.com>2021-05-27 20:39:07 -0300
commit5571d277b93b62c73568b78c652c85b2e8e95183 (patch)
tree0d97d65058e31ccdeab4006384442a8e378d5f06 /plugins/python/python_style_guide.md
parentf58165fd33919951e2ca594c6f19a785420fc4f9 (diff)
parent7f8b0a19cff46f7d27451fb9942eea5018f0c5b5 (diff)
Merge upstream changes
Diffstat (limited to 'plugins/python/python_style_guide.md')
-rw-r--r--plugins/python/python_style_guide.md26
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',
+}
+```