Skip to content

Latest commit

 

History

History
20 lines (12 loc) · 901 Bytes

STYLE_GUIDE.md

File metadata and controls

20 lines (12 loc) · 901 Bytes

OpenThread Coding Conventions and Style

Python

Standards

  • OpenThread uses and enfores both Python 2 and Python 3. Support for Python 2 is a result of the fact that some current Linux distributions and Macs are still using 2.x as default.

Conventions and Best Practices

  • Run pylint over your code. pylint is a tool for finding bugs and style problems in Python source code. It finds problems that are typically caught by a compiler for less dynamic languages like C and C++. Because of the dynamic nature of Python, some warnings may be incorrect; however, spurious warnings should be fairly infrequent.

Format and Style

  • All code should adhere to PEP 8.