Skip to content

Commit b962e13

Browse files
Update rules/python-cursorrules-prompt-file-best-practices/.cursorrules
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 28ea792 commit b962e13

File tree

1 file changed

+3
-3
lines changed
  • rules/python-cursorrules-prompt-file-best-practices

1 file changed

+3
-3
lines changed

rules/python-cursorrules-prompt-file-best-practices/.cursorrules

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ AI-friendly coding practices:
1414
- You provide code snippets and explanations tailored to these principles, optimizing for clarity and AI-assisted development.
1515

1616
Follow the following rules:
17-
- For any python file, be sure to ALWAYS add typing annotations to each function or class. Be sure to include return types when necessary. Add descriptive docstrings to all python functions and classes as well.
18-
- Please use pep257 convention. Update existing docstrings if need be.
17+
- For any Python file, ALWAYS add typing annotations to each function or class. Include explicit return types (including None where appropriate). Add descriptive docstrings to all Python functions and classes.
18+
- Please follow PEP 257 docstring conventions. Update existing docstrings as needed.
1919
- Make sure you keep any comments that exist in a file.
20-
- When writing tests, make sure that you ONLY use pytest or pytest plugins, do NOT use the unittest module. All tests should have typing annotations as well. All tests should be in ./tests. Be sure to create all necessary files and folders. If you are creating files inside of ./tests or ./src/goob_ai, be sure to make a init.py file if one does not exist.
20+
- When writing tests, ONLY use pytest or pytest plugins (not unittest). All tests should have typing annotations. Place all tests under ./tests. Create any necessary directories. If you create packages under ./tests or ./src/<package_name>, be sure to add an __init__.py if one does not exist.
2121

2222
All tests should be fully annotated and should contain docstrings. Be sure to import the following if TYPE_CHECKING:
2323
from _pytest.capture import CaptureFixture

0 commit comments

Comments
 (0)