Skip to content

Commit 216cb32

Browse files
authored
Create rule.txt
1 parent b5667e5 commit 216cb32

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

rule.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
### ✅ **Python Code Conventions (PEP 8 Overview)**
2+
3+
1. **Indentation**: Use 4 spaces per indentation level.
4+
2. **Line Length**: Limit lines to 79 characters.
5+
3. **Blank Lines**: Use blank lines to separate functions and classes.
6+
4. **Imports**:
7+
8+
* Standard libraries first, third-party next, then local.
9+
* One import per line.
10+
5. **Naming Conventions**:
11+
12+
* `snake_case` for variables and functions.
13+
* `CamelCase` for classes.
14+
* `UPPER_CASE` for constants.
15+
6. **Whitespace**:
16+
17+
* Avoid extra spaces inside parentheses, brackets, or before commas.
18+
7. **Comments**:
19+
20+
* Use inline comments sparingly.
21+
* Use docstrings (`"""Example"""`) for modules, functions, classes.
22+
8. **Python version**:
23+
* use python 3.5.2

0 commit comments

Comments
 (0)