mirror of
https://github.com/datafolklabs/cement.git
synced 2026-02-06 13:56:49 +00:00
Type Annotations: core.output
- Resolves Issue #706 - Related to PR #628
This commit is contained in:
parent
bc8d247a43
commit
52e9ee20f9
@ -40,6 +40,7 @@ Refactoring:
|
||||
- `[core.log]` [Issue #703](https://github.com/datafolklabs/cement/issues/703)
|
||||
- `[core.mail]` [Issue #704](https://github.com/datafolklabs/cement/issues/704)
|
||||
- `[core.meta]` [Issue #705](https://github.com/datafolklabs/cement/issues/705)
|
||||
- `[core.output]` [Issue #706](https://github.com/datafolklabs/cement/issues/706)
|
||||
- `[utils.fs]` [Issue #688](https://github.com/datafolklabs/cement/issues/688)
|
||||
- `[utils.misc]` [Issue #689](https://github.com/datafolklabs/cement/issues/689)
|
||||
- `[utils.shell]` [Issue #690](https://github.com/datafolklabs/cement/issues/690)
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
"""Cement core output module."""
|
||||
|
||||
from abc import abstractmethod
|
||||
from typing import Any, Dict
|
||||
from ..core.interface import Interface
|
||||
from ..core.handler import Handler
|
||||
from ..utils.misc import minimal_logger
|
||||
@ -17,7 +18,7 @@ class OutputInterface(Interface):
|
||||
:class:`OutputHandler` base class as a starting point.
|
||||
"""
|
||||
|
||||
class Meta:
|
||||
class Meta(Interface.Meta):
|
||||
|
||||
"""Handler meta-data."""
|
||||
|
||||
@ -25,7 +26,7 @@ class OutputInterface(Interface):
|
||||
interface = 'output'
|
||||
|
||||
@abstractmethod
|
||||
def render(self, data, *args, **kwargs):
|
||||
def render(self, data: Dict[str, Any], *args: Any, **kwargs: Any) -> str:
|
||||
"""
|
||||
Render the ``data`` dict into output in some fashion. This function
|
||||
must accept both ``*args`` and ``**kwargs`` to allow an application to
|
||||
@ -47,4 +48,5 @@ class OutputHandler(OutputInterface, Handler):
|
||||
|
||||
"""Output handler implementation."""
|
||||
|
||||
pass # pragma: nocover
|
||||
class Meta(Handler.Meta):
|
||||
pass # pragma: nocover
|
||||
|
||||
Loading…
Reference in New Issue
Block a user