diff options
| author | exislow <exislow@users.noreply.github.com> | 2025-07-03 09:57:26 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-03 09:57:26 +0200 |
| commit | 7da0d4c41e4abb6ec03ee1b0f64474ee970a230e (patch) | |
| tree | a5e625565e2439ad92c590f7f9d2aeaf49824fe9 /.github | |
| parent | 29ea5c51825628dbe96ce4404488b87d5fadb80d (diff) | |
| parent | 4662d18fdfc25d42d496cf6abb1c8d44be0c76dd (diff) | |
| download | tidal-dl-ng-7da0d4c41e4abb6ec03ee1b0f64474ee970a230e.tar.gz | |
Merge pull request #478 from exislow/ai-refactoring
Diffstat (limited to '.github')
| -rw-r--r-- | .github/copilot-instructions.md | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 0000000..f62d2fa --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,36 @@ +--- +applyTo: "**/*.py" +--- + +# Project general coding standards + +## Naming Conventions + +- Use snake_case for variable and function names. +- Use CamelCase for class names. +- Follow PEP 8 style guidelines. +- Prefix private class members with underscore (\_). +- Use ALL_CAPS for constants. + +## Error Handling + +- Use try/except blocks for async operations. +- Always log errors with contextual information. + +## Coding Guidelines + +- Use type annotations / hints for function and method parameters, return types and variables. Follow PEP 484. +- Use the modern built-in generics from the `typing` module, such as `list`, `dict`, and `set`, instead of the older `List`, `Dict`, and `Set` from `typing`. +- Use newest coding style which is supported by the used Python version. +- Use more blank lines to achieve better code organization and readability. +- Follow PEP 492 – Coroutines with async and await syntax +- Follow PEP 498 – Literal String Interpolation +- Follow PEP 572 – Assignment Expressions + +## Code Documentation + +- Always write doc strings for all modules, classes, functions, and methods using google docstring style. +- Use typing in doc strings. +- Use line comments to explain complex logic. +- If refactoring code, ensure to update or add doc strings accordingly. +- If refactoring code to not remove existing line comments, but to update them to reflect the new code logic. |
