You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added code conventions to CONTRIBUTING.md (soxoj#1589)
Added a link to code of conduct inside of CONTRIBUTING.md. Added naming conventions, indentation and import conventions. Added link to PEP 8 which I think most closely resembles the coding style used.
Copy file name to clipboardexpand all lines: CONTRIBUTING.md
+24-1
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,10 @@
2
2
3
3
Hey! I'm really glad you're reading this. Maigret contains a lot of sites, and it is very hard to keep all the sites operational. That's why any fix is important.
4
4
5
+
## Code of Conduct
6
+
7
+
Please read and follow the [Code of Conduct](CODE_OF_CONDUCT.md) to foster a welcoming and inclusive community.
8
+
5
9
## How to add a new site
6
10
7
11
#### Beginner level
@@ -27,4 +31,23 @@ Always write a clear log message for your commits. One-line messages are fine fo
27
31
28
32
## Coding conventions
29
33
30
-
Start reading the code and you'll get the hang of it. ;)
34
+
### General Guidelines
35
+
36
+
- Try to follow [PEP 8](https://www.python.org/dev/peps/pep-0008/) for Python code style.
37
+
- Ensure your code passes all tests before submitting a pull request.
38
+
39
+
### Code Style
40
+
41
+
-**Indentation**: Use 4 spaces per indentation level.
42
+
-**Imports**:
43
+
- Standard library imports should be placed at the top.
44
+
- Third-party imports should follow.
45
+
- Group imports logically.
46
+
47
+
### Naming Conventions
48
+
49
+
-**Variables and Functions**: Use `snake_case`.
50
+
-**Classes**: Use `CamelCase`.
51
+
-**Constants**: Use `UPPER_CASE`.
52
+
53
+
Start reading the code and you'll get the hang of it. ;)
0 commit comments