Feature/python demo poc#12
Conversation
|
|
||
|
|
||
| class PaymentGateway: | ||
| async def capture_payment( |
There was a problem hiding this comment.
The capture_payment method is defined as async but does not contain any await calls. If this method is intended to perform I/O (e.g., call an external payment processor), it should include await expressions. If it's purely synchronous logic, consider removing the async keyword for clarity, or add a comment explaining why it's async without await (e.g., a placeholder for future I/O).
|
|
||
| def build_checkout_service() -> CheckoutService: | ||
| return CheckoutService( | ||
| order_repository=OrderRepository(), |
There was a problem hiding this comment.
Directly instantiating concrete dependencies like OrderRepository within this factory function creates tight coupling. This makes it challenging to provide different implementations (e.g., for testing or different environments) or to configure them dynamically. Consider passing pre-configured instances of these dependencies to build_checkout_service or using a dependency injection container to manage their lifecycle and configuration.
No description provided.