Skip to content

Commit

Permalink
docs: update guidelines_code.md
Browse files Browse the repository at this point in the history
accross -> across
  • Loading branch information
eltociear authored Oct 4, 2024
1 parent 306285b commit 3f458f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/core/tests/processor/data/guidelines_code.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
- Asynchronous code
- Don’t replicate object that are Standalone/Singleton or with heavy dependencies. All python objects are references. Use the references: 🔺🔺🔺
- **Example**: Recreating a `BrainService` inside a function is an antipattern. This function should take `service : BrainService` as a parameter ( also easily testable via dependency injection)
- **Example**: Recreating a class that connects to a `APIService` is an antipattern. Connection creation is pretty costly process. You should the a **single object** and pass it accross function calls
- **Example**: Recreating a class that connects to a `APIService` is an antipattern. Connection creation is pretty costly process. You should the a **single object** and pass it across function calls
- Error handling:
- Use specific exception types rather than catching all exceptions. The caller can then `try .. except CustomException`
- Create custom exception classes for **application-specific errors.**
Expand Down

0 comments on commit 3f458f6

Please # to comment.