-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cursorrules
40 lines (30 loc) · 975 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
36
37
38
39
40
# Project Dependencies
- Natal: https://pypi.org/project/natal/
# 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
- use Google style docstrings
- don't write type hints in docstrings
- write short description in the first line
- refer to the following example:
```python
def function_with_pep484_type_annotations(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
- use nested selectors to style components
- try to use variables for colors, sizes, etc.