diff --git a/CODING_STYLE b/CODING_STYLE index 7cc625563d..44bd7a0bad 100644 --- a/CODING_STYLE +++ b/CODING_STYLE @@ -1,4 +1,3 @@ - Evennia Code Style ------------------ All code submitted or committed to the Evennia project needs to follow the @@ -22,11 +21,19 @@ A quick list of code style points - Evennia src/ modules - Evennia game/ modules +Documentation +------------- +Remember that Evennia's source code is intended to be read - and will be read - by +game admins trying to implement various features. Evennia prides itself with being +extensively documented. Modules, functions, classes and class methods should all +start with at least one line of docstring summing up the function's purpose. Ideally +also explain eventual arguments and caveats. Add comments where appropriate. + Pylint ------ The program 'pylint' (http://www.logilab.org/857) is a useful tool for checking your Python code for errors. It will also check how well your code adheres to -the PEP 8 guidelines and tells you what can be improved. +the PEP 8 guidelines (such as lack of docstrings) and tells you what can be improved. Since pylint cannot catch dynamically created variables used in commands and elsewhere in Evennia, one needs to reduce some checks to avoid false errors and @@ -44,10 +51,9 @@ From now on you can then just run > pylint filename.py - Ask Questions! -------------- -If any of the rules outlined in PEP 8 or in the list above doesn't make sense, please +If any of the rules outlined in PEP 8 or in the sections above doesn't make sense, please don't hesitate to ask on the Evennia mailing list at http://evennia.com. Keeping our code style uniform makes this project much easier for a wider group of people to participate in.