Skip to content

Commit

Permalink
python format
Browse files Browse the repository at this point in the history
  • Loading branch information
oeqqwq committed Aug 22, 2024
1 parent 1895f28 commit e4812d7
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 34 deletions.
2 changes: 1 addition & 1 deletion dataproxy_sdk/python/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
__all__ = [
"DataProxyFileAdapter",
"proto",
]
]
17 changes: 13 additions & 4 deletions dataproxy_sdk/python/dp_file_adapter.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
from . import libdataproxy
from . import dp_pb2 as proto


class DataProxyFileAdapter:
def __init__(self, config: proto.DataProxyConfig):
self.data_proxy_file = libdataproxy.DataProxyFile(config.SerializeToString())

def close(self):
self.data_proxy_file.close()

def download_file(self, info: proto.DownloadInfo, file_path: str, file_format: proto.FileFormat):
self.data_proxy_file.download_file(info.SerializeToString(), file_path, file_format)
def download_file(
self, info: proto.DownloadInfo, file_path: str, file_format: proto.FileFormat
):
self.data_proxy_file.download_file(
info.SerializeToString(), file_path, file_format
)

def upload_file(self, info: proto.UploadInfo, file_path: str, file_format: proto.FileFormat):
self.data_proxy_file.upload_file(info.SerializeToString(), file_path, file_format)
def upload_file(
self, info: proto.UploadInfo, file_path: str, file_format: proto.FileFormat
):
self.data_proxy_file.upload_file(
info.SerializeToString(), file_path, file_format
)
2 changes: 1 addition & 1 deletion dataproxy_sdk/python/dp_pb2.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from dataproxy_sdk.proto.data_proxy_pb_pb2 import *
from dataproxy_sdk.proto.data_proxy_pb_pb2 import *
56 changes: 28 additions & 28 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,46 +33,46 @@

# -- Project information -----------------------------------------------------

project = 'DataProxy'
copyright = '2023 Ant Group Co., Ltd.'
author = 'DataProxy authors'
project = "DataProxy"
copyright = "2023 Ant Group Co., Ltd."
author = "DataProxy authors"

# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.napoleon',
'sphinx.ext.autodoc',
'sphinx.ext.graphviz',
'sphinx.ext.todo',
'sphinx.ext.viewcode',
'sphinx.ext.extlinks',
'sphinx.ext.autosectionlabel',
'myst_parser',
"sphinx.ext.napoleon",
"sphinx.ext.autodoc",
"sphinx.ext.graphviz",
"sphinx.ext.todo",
"sphinx.ext.viewcode",
"sphinx.ext.extlinks",
"sphinx.ext.autosectionlabel",
"myst_parser",
"nbsphinx",
'sphinxcontrib.actdiag',
'sphinxcontrib.blockdiag',
'sphinxcontrib.nwdiag',
'sphinxcontrib.packetdiag',
'sphinxcontrib.rackdiag',
'sphinxcontrib.seqdiag',
'sphinx_design',
"sphinxcontrib.actdiag",
"sphinxcontrib.blockdiag",
"sphinxcontrib.nwdiag",
"sphinxcontrib.packetdiag",
"sphinxcontrib.rackdiag",
"sphinxcontrib.seqdiag",
"sphinx_design",
]

nbsphinx_requirejs_path = ''
nbsphinx_requirejs_path = ""

# Make sure the target is unique
autosectionlabel_prefix_document = True

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

# Enable TODO
todo_include_todos = True
Expand All @@ -82,20 +82,20 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'pydata_sphinx_theme'
html_theme = "pydata_sphinx_theme"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ["_static"]

html_favicon = '_static/favicon.ico'
html_favicon = "_static/favicon.ico"

html_css_files = [
'css/custom.css',
"css/custom.css",
]

html_js_files = ['js/custom.js']
html_js_files = ["js/custom.js"]

html_theme_options = {
"icon_links": [
Expand Down Expand Up @@ -139,9 +139,9 @@
# app setup hook
def setup(app):
app.add_config_value(
'recommonmark_config',
"recommonmark_config",
{
'auto_toc_tree_section': 'Contents',
"auto_toc_tree_section": "Contents",
},
True,
)

0 comments on commit e4812d7

Please sign in to comment.