mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
1.2 KiB
1.2 KiB
Coding Style Guidelines
This document summarizes general principles for writing clear and maintainable code in this repository.
- Readability First - Prioritize clarity over cleverness. Use whitespace and indentation to structure code logically.
- Use Descriptive Names - Choose variable and function names that reveal intent. Avoid abbreviations unless widely understood.
- Keep Functions Small - Limit functions to a single responsibility. Break complex tasks into smaller helpers when possible.
- Document Behavior - Write docstrings for public modules, classes, and functions. Include inline comments for non-obvious logic.
- Handle Errors Gracefully - Use exceptions to signal errors and provide helpful messages. Validate inputs early.
- Follow Established Conventions - Adhere to PEP 8 for Python code style, including naming rules and line length.
- Write Tests - Cover new features with unit tests and keep existing tests passing.
- Review and Refactor - Regularly revisit code to simplify and improve. Remove unused code and fix warnings.
Following these guidelines will help ensure the codebase stays consistent and easy to maintain.