-
Notifications
You must be signed in to change notification settings - Fork 1
/
.cursorrules
35 lines (27 loc) · 855 Bytes
/
.cursorrules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Python Style
- use python 3.12 or above
- all function must be type hinted
- use latest type hints syntax, eg.
- `list[int]` instead of `List[int]`
- `dict[str, int]` instead of `Dict[str, int]`
- `tuple[int, ...]` instead of `Tuple[int, ...]`
- `A | B` instead of `Union[A, B]`
- use `typing.Self` instead of forward reference string "ClassName"
# Docstrings Style
- use Google style docstrings
- don't write type hints in docstrings
- refer to the following example:
```python
def sample_function(param1: int, param2: str) -> bool:
"""
Example function with PEP 484 type annotations.
Args:
param1: The first parameter.
param2: The second parameter.
Returns:
The return value. True for success, False otherwise.
"""
```
# CSS Style
- use nested selectors to style components
- try to use variables for colors, sizes, etc.