mirror of
https://github.com/evennia/evennia.git
synced 2026-03-28 02:36:32 +01:00
Editing the CODING_STYLE, adding a mention on documentation
This commit is contained in:
parent
9b9f90d91c
commit
bb7e5dd9f5
1 changed files with 10 additions and 4 deletions
14
CODING_STYLE
14
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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue