Skip to content
Snippets Groups Projects

Refactor Cart into checkerboard table

Merged Mateusz Kudela requested to merge mkudela/issue-173 into develop
Compare and Show latest version
389 files
+ 9829
3484
Compare changes
  • Side-by-side
  • Inline
Files
389
@@ -34,8 +34,20 @@ class ContextualCLICommand(Generic[AsyncContextManagerType], ExternalCLICommand,
"""
return
async def _configure_inside_context_manager(self) -> None:
"""Configure the command before running."""
return
async def fetch_data(self) -> None:
"""Fetch data."""
return
async def _hook_before_entering_context_manager(self) -> None:
"""Hook called before entering the context manager."""
"""Additional hook called before entering the context manager."""
return
async def _hook_after_entering_context_manager(self) -> None:
"""Additional hook called after entering the context manager."""
return
async def run(self) -> None:
@@ -49,6 +61,9 @@ class ContextualCLICommand(Generic[AsyncContextManagerType], ExternalCLICommand,
await self._hook_before_entering_context_manager()
async with self._context_manager_instance:
await self._hook_after_entering_context_manager()
await self.fetch_data()
if not self._skip_validation:
await self.validate_inside_context_manager()
await self._configure_inside_context_manager()
await self._run()
Loading