chore: 添加虚拟环境到仓库

- 添加 backend_service/venv 虚拟环境
- 包含所有Python依赖包
- 注意:虚拟环境约393MB,包含12655个文件
This commit is contained in:
2025-12-03 10:19:25 +08:00
parent a6c2027caa
commit c4f851d387
12655 changed files with 3009376 additions and 0 deletions

View File

@@ -0,0 +1,76 @@
"""Mixin classes used by Base subclasses to inherit backend functionality."""
import os
import typing
from .. import parameters
from . import piping
from . import rendering
from . import unflattening
from . import viewing
__all__ = ['Render', 'Pipe', 'Unflatten', 'View']
class Render(parameters.Parameters):
"""Parameters for calling and calling ``graphviz.render()``."""
def _get_render_parameters(self,
outfile: typing.Union[os.PathLike, str, None] = None,
raise_if_result_exists: bool = False,
overwrite_source: bool = False,
**kwargs):
kwargs = self._get_parameters(**kwargs)
kwargs.update(outfile=outfile,
raise_if_result_exists=raise_if_result_exists,
overwrite_filepath=overwrite_source)
return [kwargs.pop('engine'), kwargs.pop('format')], kwargs
@property
def _render(_): # noqa: N805
"""Simplify ``._render()`` mocking."""
return rendering.render
class Pipe(parameters.Parameters):
"""Parameters for calling and calling ``graphviz.pipe()``."""
_get_format = staticmethod(rendering.get_format)
_get_filepath = staticmethod(rendering.get_filepath)
def _get_pipe_parameters(self, **kwargs):
kwargs = self._get_parameters(**kwargs)
return [kwargs.pop('engine'), kwargs.pop('format')], kwargs
@property
def _pipe_lines(_): # noqa: N805
"""Simplify ``._pipe_lines()`` mocking."""
return piping.pipe_lines
@property
def _pipe_lines_string(_): # noqa: N805
"""Simplify ``._pipe_lines_string()`` mocking."""
return piping.pipe_lines_string
class Unflatten:
@property
def _unflatten(_): # noqa: N805
"""Simplify ``._unflatten mocking."""
return unflattening.unflatten
class View:
"""Open filepath with its default viewing application
(platform-specific)."""
_view_darwin = staticmethod(viewing.view_darwin)
_view_freebsd = staticmethod(viewing.view_unixoid)
_view_linux = staticmethod(viewing.view_unixoid)
_view_windows = staticmethod(viewing.view_windows)