Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic implementation of storage service #14

Merged
merged 8 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion app/Services/storage/s3_compatible_storage.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# pylint now reporting `opendal` as a `no-name-in-module` error, so we need to disable it as a temporary workaround
# Related issue: https://github.com/pylint-dev/pylint/issues/9185
# Remove below `# pylint` once the issue is resolved
# pylint: disable=import-error,no-name-in-module
import os
import urllib.parse

Expand Down Expand Up @@ -45,7 +49,6 @@ def __init__(self):
self._res_endpoint = self._resolve_endpoint()
self._access_key_id = config.storage.s3.access_key_id
self._secret_access_key = config.storage.s3.secret_access_key
self.file_path_warp = lambda x: PurePosixPath(x)
hv0905 marked this conversation as resolved.
Show resolved Hide resolved
self.file_path_str_warp = lambda x: str(PurePosixPath(x))
self.op = AsyncOperator("s3",
root=str(self.static_dir),
Expand Down
7 changes: 1 addition & 6 deletions pylintrc.toml
Original file line number Diff line number Diff line change
Expand Up @@ -365,12 +365,7 @@ confidence = ["HIGH", "CONTROL_FLOW", "INFERENCE", "INFERENCE_FAILURE", "UNDEFIN
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use "--disable=all --enable=classes
# --disable=W".

# pylint now reporting `opendal` as a `no-name-in-module` error, so we need to disable it as a temporary workaround
# Related issue: https://github.com/pylint-dev/pylint/issues/9185
# Remove `no-name-in-module` and `import-error` once the issue is resolved

disable = ["no-name-in-module", "import-error", "raw-checker-failed", "bad-inline-option", "locally-disabled", "file-ignored", "suppressed-message", "useless-suppression", "deprecated-pragma", "use-symbolic-message-instead", "use-implicit-booleaness-not-comparison-to-string", "use-implicit-booleaness-not-comparison-to-zero", "missing-function-docstring", "missing-class-docstring", "missing-module-docstring"]
disable = ["raw-checker-failed", "bad-inline-option", "locally-disabled", "file-ignored", "suppressed-message", "useless-suppression", "deprecated-pragma", "use-symbolic-message-instead", "use-implicit-booleaness-not-comparison-to-string", "use-implicit-booleaness-not-comparison-to-zero", "missing-function-docstring", "missing-class-docstring", "missing-module-docstring"]

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down
Loading