-
Notifications
You must be signed in to change notification settings - Fork 24
Style Guide Python
DRP edited this page Oct 10, 2018
·
1 revision
NOTE: If not explicitly stated in this guide, defer to PEP 8 standard
-
Modules - Snake Case
- example: some_random_module
-
Classes - Pascal Case
- example: SomeRandomClass
-
Methods - Snake Case
- example: some_random_method
-
Variables - Camel Case
- example: someRandomVariable
- Unless otherwise specified, docstring format should follow numpy docstring format, as specified in numpydoc v0.9.dev0 Manual.
- All modules, classes, and methods shall include at minimum a short summary, parameters section, and returns section. Exceptions to this rule is stated below
- All modules, classes, and methods under 10 lines may include only the short summary
- All trivial modules, classes, and methods may omit docstrings, at discretion of developer, provided that self-explanatory naming is utilized.
- Use
#!/usr/bin/env python
for shebang lines when applicable - Use
from __future__ import division
in accordance with PEP 238
All other queries default to the ROS PyStyleGuide
Remember: Respectable FusionAD-ers always clean up after themselves and document their work!