From d04b9b204ea88ffb75f5006d21deb1c6269eb4b2 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Fri, 10 Mar 2017 15:35:34 -0800 Subject: [PATCH] Function bodies should be empty (#959) I've seen some stubs like ``` class X: def __init__(self, x: str) -> None: self.x = x self.y = 0 ``` I think this should be written instead as ``` class X: x: str y: int def __init__(self, x: str) -> None: ... ``` --- CONTRIBUTING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bf1eaa689..91b97f4e1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -127,6 +127,7 @@ Style conventions for stub files are different from PEP 8. The general rule is that they should be as concise as possible. Specifically: * there is no line length limit; * prefer long lines over elaborate indentation; +* all function bodies should be empty; * prefer ``...`` over ``pass``; * prefer ``...`` on the same line as the class/function signature; * avoid vertical whitespace between consecutive module-level functions,