arbret/.cursor/rules/python_coding_standards.mdc

11 lines
652 B
Text
Raw Permalink Normal View History

2025-12-20 19:09:33 +01:00
---
description: Coding standards that should be respect when working on Python code.
alwaysApply: false
---
- Use type hinting. Check regularly with mypy via the `Makefile` command `make typecheck`.
- Use docstrings following the style of the existing code.
- Avoid bloaty comments. Instead, favour using descriptive functions and variable names to make what's happening obvious.
- Use tests frequently to detect errors early. Make sure that tests are kept up to date. Remove dead code tests when removing code.
2025-12-20 22:18:14 +01:00
- Avoid using comments to divide sections of code. If you feel that is necessary, you probably should break into multiple files instead.