From d10d542e0c1628c312adbfc13df63fa299e9631e Mon Sep 17 00:00:00 2001 From: Oleksandr Bezdieniezhnykh Date: Sat, 28 Mar 2026 16:18:10 +0200 Subject: [PATCH] Enhance coding guidelines in `.cursor/rules/coderule.mdc` and `.cursor/rules/python.mdc` - Added a guideline to place all source code under the `src/` directory in `coderule.mdc`. - Removed the outdated guideline regarding the `src/` layout in `python.mdc` to streamline project structure. These updates improve project organization and maintainability by clarifying the structure for source code and project files. --- .cursor/rules/coderule.mdc | 1 + .cursor/rules/python.mdc | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.cursor/rules/coderule.mdc b/.cursor/rules/coderule.mdc index e7fe6f0..ecfb20e 100644 --- a/.cursor/rules/coderule.mdc +++ b/.cursor/rules/coderule.mdc @@ -24,3 +24,4 @@ alwaysApply: true - Make sure we don't commit binaries, create and keep .gitignore up to date and delete binaries after you are done with the task - Never force-push to main or dev branches +- Place all source code under the `src/` directory; keep project-level config, tests, and tooling at the repo root diff --git a/.cursor/rules/python.mdc b/.cursor/rules/python.mdc index fc8e934..95d0628 100644 --- a/.cursor/rules/python.mdc +++ b/.cursor/rules/python.mdc @@ -8,7 +8,6 @@ globs: ["**/*.py", "**/pyproject.toml", "**/requirements*.txt"] - Use type hints on all function signatures; validate with `mypy` or `pyright` - Use `pydantic` for data validation and serialization - Import order: stdlib -> third-party -> local; use absolute imports -- Use `src/` layout to separate app code from project files - Use context managers (`with`) for resource management - Catch specific exceptions, never bare `except:`; use custom exception classes - Use `async`/`await` with `asyncio` for I/O-bound concurrency