chore: 添加虚拟环境到仓库
- 添加 backend_service/venv 虚拟环境 - 包含所有Python依赖包 - 注意:虚拟环境约393MB,包含12655个文件
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
"""Iterables of DOT source code lines (including final newline)."""
|
||||
|
||||
import typing
|
||||
|
||||
from . import copying
|
||||
|
||||
__all__ = ['Base']
|
||||
|
||||
|
||||
class LineIterable:
|
||||
"""Iterable of DOT Source code lines
|
||||
(mimics ``file`` objects in text mode)."""
|
||||
|
||||
def __iter__(self) -> typing.Iterator[str]: # pragma: no cover
|
||||
r"""Yield the generated DOT source line by line.
|
||||
|
||||
Yields: Line ending with a newline (``'\n'``).
|
||||
"""
|
||||
raise NotImplementedError('to be implemented by concrete subclasses')
|
||||
|
||||
|
||||
# Common base interface for all exposed classes
|
||||
class Base(LineIterable, copying.CopyBase):
|
||||
"""LineIterator with ``.source`` attribute, that it returns for ``str()``."""
|
||||
|
||||
@property
|
||||
def source(self) -> str: # pragma: no cover
|
||||
raise NotImplementedError('to be implemented by concrete subclasses')
|
||||
|
||||
def __str__(self) -> str:
|
||||
"""The DOT source code as string."""
|
||||
return self.source
|
||||
Reference in New Issue
Block a user