fixed compatibility with python 3.10.
This commit is contained in:
parent
ab7cd1b885
commit
d5ac5cd427
@ -59,8 +59,13 @@ class DownloadCommand(BaseCommand):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def download(
|
def download(
|
||||||
cls, remote_path: str, local_path: str, is_recursive: bool, is_skip_if_exists: bool, password: str | None,
|
cls,
|
||||||
excludes: list[str]
|
remote_path: str,
|
||||||
|
local_path: str,
|
||||||
|
is_recursive: bool,
|
||||||
|
is_skip_if_exists: bool,
|
||||||
|
password: str | None,
|
||||||
|
excludes: list[str],
|
||||||
) -> None:
|
) -> None:
|
||||||
(remote, laboratory_name, r_path) = cls._parse_remote_host_with_path(remote_path)
|
(remote, laboratory_name, r_path) = cls._parse_remote_host_with_path(remote_path)
|
||||||
r_path = r_path.rstrip("/")
|
r_path = r_path.rstrip("/")
|
||||||
@ -100,7 +105,7 @@ class DownloadCommand(BaseCommand):
|
|||||||
folder_id: str,
|
folder_id: str,
|
||||||
basedir: str,
|
basedir: str,
|
||||||
excludes: list[str],
|
excludes: list[str],
|
||||||
is_skip_if_exists: bool
|
is_skip_if_exists: bool,
|
||||||
) -> None:
|
) -> None:
|
||||||
context = DownloadContext(False, is_skip_if_exists, [])
|
context = DownloadContext(False, is_skip_if_exists, [])
|
||||||
folder = folder_api.retrieve(folder_id)
|
folder = folder_api.retrieve(folder_id)
|
||||||
@ -146,5 +151,5 @@ class DownloadCommand(BaseCommand):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def __check_excludes(cls, excludes: list[str], laboratory: Laboratory, folder: Folder, file: File | None) -> bool:
|
def __check_excludes(cls, excludes: list[str], laboratory: Laboratory, folder: Folder, file: File | None) -> bool:
|
||||||
path = f"/{laboratory.name}{folder.path}{file.name if file is not None else ""}".rstrip("/").lower()
|
path = f"/{laboratory.name}{folder.path}{file.name if file is not None else ''}".rstrip("/").lower()
|
||||||
return path in excludes
|
return path in excludes
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "mdrs-client-python"
|
name = "mdrs-client-python"
|
||||||
version = "1.3.8"
|
version = "1.3.9"
|
||||||
description = "The mdrs-client-python is python library and a command-line client for up- and downloading files to and from MDRS based repository."
|
description = "The mdrs-client-python is python library and a command-line client for up- and downloading files to and from MDRS based repository."
|
||||||
authors = ["Yoshihiro OKUMURA <yoshihiro.okumura@riken.jp>"]
|
authors = ["Yoshihiro OKUMURA <yoshihiro.okumura@riken.jp>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
@ -13,6 +13,7 @@ classifiers=[
|
|||||||
"Programming Language :: Python :: 3.10",
|
"Programming Language :: Python :: 3.10",
|
||||||
"Programming Language :: Python :: 3.11",
|
"Programming Language :: Python :: 3.11",
|
||||||
"Programming Language :: Python :: 3.12",
|
"Programming Language :: Python :: 3.12",
|
||||||
|
"Programming Language :: Python :: 3.13",
|
||||||
"OSI Approved :: MIT License",
|
"OSI Approved :: MIT License",
|
||||||
"Topic :: Utilities",
|
"Topic :: Utilities",
|
||||||
]
|
]
|
||||||
@ -26,16 +27,16 @@ requests = "^2.32.3"
|
|||||||
requests-toolbelt = "^1.0.0"
|
requests-toolbelt = "^1.0.0"
|
||||||
python-dotenv = "^1.0.1"
|
python-dotenv = "^1.0.1"
|
||||||
pydantic = "^2.9.2"
|
pydantic = "^2.9.2"
|
||||||
pydantic-settings = "^2.5.2"
|
pydantic-settings = "^2.6.0"
|
||||||
PyJWT = "^2.9.0"
|
PyJWT = "^2.9.0"
|
||||||
validators = "^0.33.0"
|
validators = "^0.33.0"
|
||||||
|
|
||||||
[tool.poetry.group.dev.dependencies]
|
[tool.poetry.group.dev.dependencies]
|
||||||
black = "^24.8.0"
|
black = "^24.10.0"
|
||||||
flake8 = "^7.1.1"
|
flake8 = "^7.1.1"
|
||||||
Flake8-pyproject = "^1.2.3"
|
Flake8-pyproject = "^1.2.3"
|
||||||
isort = "^5.13.2"
|
isort = "^5.13.2"
|
||||||
pyright = "^1.1.380"
|
pyright = "^1.1.386"
|
||||||
|
|
||||||
[tool.poetry.scripts]
|
[tool.poetry.scripts]
|
||||||
mdrs = 'mdrsclient.__main__:main'
|
mdrs = 'mdrsclient.__main__:main'
|
||||||
|
Loading…
Reference in New Issue
Block a user