From: Marvin Schenkel Date: Thu, 29 Jan 2026 13:39:28 +0000 (+0100) Subject: Add claude instructions about comment usage. X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=0d70eda094d7b03f0deb08020018cd57220aed25;p=music-assistant-server.git Add claude instructions about comment usage. --- diff --git a/CLAUDE.md b/CLAUDE.md index 16d846a4..efe9e7fd 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -107,6 +107,21 @@ These demo/example implementations have a lot of docstrings and comments to help ## Code Style Guidelines +### Comments +Use comments wisely. Only use comments to explain a complex, multi-line block of code. + +**❌ Bad example** +```python +# add 1 and 2 together +add(1, 2) +``` + +**✅ Good example** +```python +# use xxx to achieve yyy +..multi line code block of complex code +``` + ### Docstring Format Music Assistant uses **Sphinx-style docstrings** with `:param:` syntax for documenting function parameters. This is the standard format used throughout the codebase.